Package snap.parse

Class ParseTokenImpl

java.lang.Object
snap.parse.ParseTokenImpl
All Implemented Interfaces:
ParseToken

public class ParseTokenImpl extends Object implements ParseToken
A basic implementation of a Token.
  • Field Details

    • _tokenLine

      protected TokenLine _tokenLine
    • _name

      protected String _name
    • _pattern

      protected String _pattern
    • _startCharIndex

      protected int _startCharIndex
    • _endCharIndex

      protected int _endCharIndex
    • _string

      protected String _string
  • Constructor Details

    • ParseTokenImpl

      public ParseTokenImpl()
      Constructor.
  • Method Details

    • getTokenLine

      public TokenLine getTokenLine()
      Returns the token line that holds this token.
    • getName

      public String getName()
      Returns the name.
      Specified by:
      getName in interface ParseToken
    • getPattern

      public String getPattern()
      Returns the pattern.
      Specified by:
      getPattern in interface ParseToken
    • getStartCharIndex

      public int getStartCharIndex()
      Returns the start char index of this token in text.
      Specified by:
      getStartCharIndex in interface ParseToken
    • getEndCharIndex

      public int getEndCharIndex()
      Returns the end char index of this token in text.
      Specified by:
      getEndCharIndex in interface ParseToken
    • getLineIndex

      public int getLineIndex()
      Returns the line index.
      Specified by:
      getLineIndex in interface ParseToken
    • getStartCharIndexInLine

      public int getStartCharIndexInLine()
      Returns the start char index of this token in line.
      Specified by:
      getStartCharIndexInLine in interface ParseToken
    • getEndCharIndexInLine

      public int getEndCharIndexInLine()
      Returns the start char index of this token in line.
      Specified by:
      getEndCharIndexInLine in interface ParseToken
    • getString

      public String getString()
      Returns the string.
      Specified by:
      getString in interface ParseToken
    • toString

      public String toString()
      Returns the string.
      Overrides:
      toString in class Object