Package snap.parse
Class ParseTokenImpl
java.lang.Object
snap.parse.ParseTokenImpl
- All Implemented Interfaces:
ParseToken
A basic implementation of a Token.
-
Nested Class Summary
Nested classes/interfaces inherited from interface snap.parse.ParseToken
ParseToken.Builder
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the end char index of this token in text.int
Returns the start char index of this token in line.int
Returns the line index.getName()
Returns the name.Returns the pattern.int
Returns the start char index of this token in text.int
Returns the start char index of this token in line.Returns the string.Returns the token line that holds this token.toString()
Returns the string.
-
Field Details
-
_tokenLine
-
_name
-
_pattern
-
_startCharIndex
protected int _startCharIndex -
_endCharIndex
protected int _endCharIndex -
_string
-
-
Constructor Details
-
ParseTokenImpl
public ParseTokenImpl()Constructor.
-
-
Method Details
-
getTokenLine
Returns the token line that holds this token. -
getName
Returns the name.- Specified by:
getName
in interfaceParseToken
-
getPattern
Returns the pattern.- Specified by:
getPattern
in interfaceParseToken
-
getStartCharIndex
public int getStartCharIndex()Returns the start char index of this token in text.- Specified by:
getStartCharIndex
in interfaceParseToken
-
getEndCharIndex
public int getEndCharIndex()Returns the end char index of this token in text.- Specified by:
getEndCharIndex
in interfaceParseToken
-
getLineIndex
public int getLineIndex()Returns the line index.- Specified by:
getLineIndex
in interfaceParseToken
-
getStartCharIndexInLine
public int getStartCharIndexInLine()Returns the start char index of this token in line.- Specified by:
getStartCharIndexInLine
in interfaceParseToken
-
getEndCharIndexInLine
public int getEndCharIndexInLine()Returns the start char index of this token in line.- Specified by:
getEndCharIndexInLine
in interfaceParseToken
-
getString
Returns the string.- Specified by:
getString
in interfaceParseToken
-
toString
Returns the string.
-