Class LightweightParserState

java.lang.Object
gw.internal.gosu.parser.LightweightParserState
All Implemented Interfaces:
IParserState
Direct Known Subclasses:
StandardParserState

public class LightweightParserState extends Object implements IParserState
  • Constructor Details

    • LightweightParserState

      public LightweightParserState(SourceCodeTokenizer tokenizer, int offsetShift, int lineShift)
    • LightweightParserState

      protected LightweightParserState()
  • Method Details

    • getLineNumber

      public int getLineNumber()
      Specified by:
      getLineNumber in interface IParserState
      Returns:
      the line number of this parser state
    • getLineOffset

      public int getLineOffset()
      Specified by:
      getLineOffset in interface IParserState
      Returns:
      the starting line of this parser state
    • getTokenColumn

      public int getTokenColumn()
      Specified by:
      getTokenColumn in interface IParserState
      Returns:
      the column represented by this parser state
    • getSource

      public String getSource()
      Specified by:
      getSource in interface IParserState
      Returns:
      the program source associated with this parser state
    • getTokenStart

      public int getTokenStart()
      Specified by:
      getTokenStart in interface IParserState
      Returns:
      the start of the token represented by this parser state
    • cloneWithNewTokenStartAndTokenEnd

      public LightweightParserState cloneWithNewTokenStartAndTokenEnd(int newTokenStart, int newLength)
      Specified by:
      cloneWithNewTokenStartAndTokenEnd in interface IParserState
    • getTokenEnd

      public int getTokenEnd()
      Specified by:
      getTokenEnd in interface IParserState
      Returns:
      the end of the token represented by this parser state