Description
The MustacheToken defines a Mustache token holder.
Constructors
Creates an instance of a Mustache token.
publicMustacheToken(MustacheTokenType type, String value, int line, int column)
- type: MustacheTokenType - token type.
- value: String - token value.
- line: int - line number where the token is.
- column: int - column number where the token is.
Properties
column
Column number where the token is.
private finalint _column
line
Line number where the token is.
private finalint _line
tokens
Gets a list of subtokens.
private finalList<MustacheToken> _tokens = new ArrayList<>()
type
Gets the token type.
private finalMustacheTokenType _type
value
Gets the token value or variable name.
publicString _value
Instance methods
getType
Gets the token type.
publicMustacheTokenType getType()
- returns: MustacheTokenType - token type.
getValue
Gets the token value or variable name.
publicString getValue()
- returns: String - token value or variable name.
getTokens
Gets a list of subtokens.
publicList<MustacheToken> getTokens()
- returns: List<MustacheToken> - a list of subtokens.
getLine
Gets the line number where the token is.
publicint getLine()
- returns: int - line number wher the token is.
getColumn
Gets the column number where the token is.
publicint getColumn()
- returns: int - column number wher the token is.