Class JustParser

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

public class JustParser extends Object
For when we just need to read ek9 files and pull out bits and bobs rather than actually compiling.
  • 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 stderr
      errorLevel - 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

      public JustParser.ReadFailure getFailure()
      Why the last source read failed, or JustParser.ReadFailure.NONE when it succeeded.
    • readSourceFile

      public boolean readSourceFile(File sourceFile, Ek9SourceVisitor visitor)
      Read the source file using the visitor supplied.