Package com.blackrook.expression.struct
Class Lexer.Token
- java.lang.Object
-
- com.blackrook.expression.struct.Lexer.Token
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCharIndex()
String
getLexeme()
int
getLineNumber()
String
getStreamName()
int
getType()
void
setLexeme(String lexeme)
Sets this token's lexeme.void
setType(int type)
Sets this token's type.String
toString()
-
-
-
Method Detail
-
getStreamName
public String 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
public String getLexeme()
- Returns:
- this token's lexeme.
-
setLexeme
public void setLexeme(String lexeme)
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.
-
-