Class ParsedDocument

java.lang.Object
io.deephaven.lang.parse.ParsedDocument

public class ParsedDocument extends Object
Represents a parsed document. For now, we will be re-parsing the entire string document every time, but in the future, we would like to be able to update only ranges of changed code.
  • Constructor Details

  • Method Details

    • findNode

      public Node findNode(int p)
    • getDoc

      public ChunkerDocument getDoc()
    • withError

      public ParsedDocument withError(String src, ParseException e)
      When a parse fails, we do not throw away our last-good document. We do, however, record the failure information, which you should check via isError().
      Parameters:
      src - The source with an error
      e - The parse exception. May make this any exception type.
      Returns:
      this, for chaining. We may need to make copies later, but for now, we'll use it as-is.
    • getSource

      public String getSource()
    • getLastGoodSource

      public String getLastGoodSource()
    • isError

      public boolean isError()
    • resetFailure

      public void resetFailure()
    • logErrors

      public void logErrors(Logger log)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • findEditRange

      public Position.Builder findEditRange(DocumentRange replaceRange)
    • extendEnd

      public void extendEnd(CompletionItem.Builder item, Position requested, Node node)
    • getAssignments

      public Map<String,List<ChunkerAssign>> getAssignments()