Defines a Mustache token holder.
Description
The MustacheToken defines a Mustache token holder.
Constructors
Creates an instance of a Mustache token.
public
constructor(type: MustacheTokenType, value: string, line: number, column: number)
- type: MustacheTokenType - token type.
- value: string - token value.
- line: number - line number where the token is.
- column: number - column number where the token is.
Properties
column
Column number where the token is.
public
column(): number
- returns: number - column number.
line
Line number where the token is.
public
line(): number
- returns: number - line number.
tokens
Gets a list of subtokens.
public
tokens(): MustacheToken[]
- returns: MustacheToken[] - list of subtokens.
type
Gets the token type.
public
type(): MustacheTokenType
- returns: MustacheTokenType - token type.
value
Gets the token value or variable name.
public
value(): string
- returns: string - token value or variable name.