Class FrontMatter

java.lang.Object
org.ek9lang.compiler.common.FrontMatter

public final class FrontMatter extends Object
THE split of an example source into its <?- ... -?> JSON front matter and its EK9 body - the one reader of that format. Use it; never write another.

Three corpora share the format: the Q&A (qaExamples, read by org.ek9lang.assist.Ek9QaFileLoader and, for its declared output, by the execution tests), the site examples (siteExamples, read by org.ek9lang.site.SiteExampleSources) and the error catalogue's examples (errorExamples, read by ErrorExamples). The site-examples spec (D3) requires one reader for all of them, so a change to the format - a new delimiter rule, the //EOF trailer - happens here once. It lives in compiler-main (moved from compiler-services' assist package, lane L0e) because the error catalogue is read here, by ek9 -h <CODE> and -E3.

The front matter is an EK9 comment block, so the file still compiles; the body is everything after the closing marker, trimmed, with a trailing //EOF removed (the corpus convention for "the source ends here").

No statics (Steve, 2026-10-28): this class holds the format's markers; the readers are classes to hold an instance of - FrontMatterJson, FrontMatterBody and HasFrontMatter.