Interface ParserState

  • All Known Implementing Classes:
    DocumentParser

    public interface ParserState
    State of the parser that is used in block parsers.

    This interface is not intended to be implemented by clients.

    • Method Detail

      • getLine

        SourceLine getLine()
        Returns:
        the current source line being parsed (full line)
      • getIndex

        int getIndex()
        Returns:
        the current index within the line (0-based)
      • getNextNonSpaceIndex

        int getNextNonSpaceIndex()
        Returns:
        the index of the next non-space character starting from getIndex() (may be the same) (0-based)
      • getColumn

        int getColumn()
        The column is the position within the line after tab characters have been processed as 4-space tab stops. If the line doesn't contain any tabs, it's the same as the getIndex(). If the line starts with a tab, followed by text, then the column for the first character of the text is 4 (the index is 1).
        Returns:
        the current column within the line (0-based)
      • getIndent

        int getIndent()
        Returns:
        the indentation in columns (either by spaces or tab stop of 4), starting from getColumn()
      • isBlank

        boolean isBlank()
        Returns:
        true if the current line is blank starting from the index
      • getActiveBlockParser

        BlockParser getActiveBlockParser()
        Returns:
        the deepest open block parser