Package com.blackrook.json.struct
Class Lexer.Token
java.lang.Object
com.blackrook.json.struct.Lexer.Token
- Enclosing class:
- Lexer
Lexer token object.
-
Constructor Details
-
Token
-
-
Method Details
-
getStreamName
- Returns:
- the name of the stream that this token came from.
-
getLineNumber
public int getLineNumber()- Returns:
- the line number within the stream that this token appeared.
-
getCharIndex
public int getCharIndex()- Returns:
- the character index that this token starts on.
-
getLexeme
- Returns:
- this token's lexeme.
-
setLexeme
Sets this token's lexeme.- Parameters:
lexeme
- the new lexeme.
-
getType
public int getType()- Returns:
- this token's type.
-
setType
public void setType(int type) Sets this token's type.- Parameters:
type
- a type corresponding to a type in the lexer or lexer kernel.
-
toString
-