Package team.unnamed.mocha.lexer
Class Token
java.lang.Object
team.unnamed.mocha.lexer.Token
Class representing a Molang token. Each token has some
information set by the lexer (i.e. start/end position,
token kind and optional value)
- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Token
-
-
Method Details
-
kind
Gets the token kind.- Returns:
- The token kind
- Since:
- 3.0.0
-
value
Gets the token value. Null if this kind of tokens doesn't allow values.- Returns:
- The token value
- Since:
- 3.0.0
-
start
public int start()Gets the start index of this token.- Returns:
- The token start
- Since:
- 3.0.0
-
end
public int end()Gets the end index of this token.- Returns:
- The token end
- Since:
- 3.0.0
-
toString
-
equals
-
hashCode
public int hashCode()
-