Class SourceText
java.lang.Object
org.ek9lang.compiler.support.SourceText
THE source of a parse rule as the developer wrote it: the characters it spans in the char stream, spaces kept. Use it
wherever source text is shown to a person or embedded in a message -
ctx.getText() joins the tokens with
nothing between them, so name? and age? becomes name?andage?. Falls back to getText() only
when the char stream is unavailable.-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringof(org.antlr.v4.runtime.ParserRuleContext ctx) The charactersctxspans, as written.static StringonOneLine(org.antlr.v4.runtime.ParserRuleContext ctx) Asof(ParserRuleContext), on one line: every run of whitespace, line breaks and indentation included, is one space.
-
Method Details
-
of
The charactersctxspans, as written. -
onOneLine
Asof(ParserRuleContext), on one line: every run of whitespace, line breaks and indentation included, is one space.
-