Class JustParser
java.lang.Object
org.ek9lang.compiler.common.JustParser
For when we just need to read ek9 files and pull out bits and bobs
rather than actually compiling.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhy the lastreadSourceFile(File, Ek9SourceVisitor)returned false - so a caller says the right thing. -
Constructor Summary
ConstructorsConstructorDescriptionJustParser(boolean reportErrors) Create new Parser with default error level 0.JustParser(boolean reportErrors, int errorLevel) Create new Parser with specified error level. -
Method Summary
Modifier and TypeMethodDescriptionWhy the last source read failed, orJustParser.ReadFailure.NONEwhen it succeeded.booleanTrue if the last source read failed because it went past one of the shape limits the lexer enforces (brackets, blocks, operators or member accesses in an expression) - an error in the source's shape, not its syntax, so the formatter cannot repair it.booleanreadSourceFile(File sourceFile, Ek9SourceVisitor visitor) Read the source file using the visitor supplied.
-
Constructor Details
-
JustParser
public JustParser(boolean reportErrors) Create new Parser with default error level 0. -
JustParser
public JustParser(boolean reportErrors, int errorLevel) Create new Parser with specified error level.- Parameters:
reportErrors- whether to report errors to stderrerrorLevel- 0=minimal, 1=visual, 2=visual+fuzzy, 3=visual+fuzzy+rich
-
-
Method Details
-
isLimitExceeded
public boolean isLimitExceeded()True if the last source read failed because it went past one of the shape limits the lexer enforces (brackets, blocks, operators or member accesses in an expression) - an error in the source's shape, not its syntax, so the formatter cannot repair it. -
getFailure
Why the last source read failed, orJustParser.ReadFailure.NONEwhen it succeeded. -
readSourceFile
Read the source file using the visitor supplied.
-