Package com.blackrook.archetext.struct
Class Lexer.Token
- java.lang.Object
-
- com.blackrook.archetext.struct.Lexer.Token
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCharIndex()StringgetLexeme()intgetLineNumber()StringgetStreamName()intgetType()voidsetLexeme(String lexeme)Sets this token's lexeme.voidsetType(int type)Sets this token's type.StringtoString()
-
-
-
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.
-
-