Class TokenDocument<T extends GenericToken<T>>

  • Direct Known Subclasses:
    JavaccTokenDocument

    public abstract class TokenDocument<T extends GenericToken<T>>
    extends Object
    Token layer of a parsed file. This object is used to store state global to all tokens of a single file, e.g. the text document. Not all languages currently have an implementation of a token document.
    See Also:
    JavaccTokenDocument
    • Constructor Detail

      • TokenDocument

        public TokenDocument​(TextDocument textDocument)
    • Method Detail

      • getFullText

        public Chars getFullText()
        Returns the original text of the file (without escaping).
      • getFirstToken

        public abstract T getFirstToken()
        Returns the first token of the token chain.
        Throws:
        IllegalStateException - If the document has not been parsed yet