MustacheToken

Defines a Mustache token holder.

Description

The MustacheToken defines a Mustache token holder.

Constructors

Creates an instance of a Mustache token.

MustacheToken(type: MustacheTokenType, value: str, line: int, column: int)

  • type: MustacheTokenType - token type.
  • value: str - 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.

column(): int

  • returns: int - column number.

line

Line number where the token is.

line(): int

  • returns: int - line number.

tokens

Gets a list of subtokens.

tokens(): List[MustacheToken]

type

Gets the token type.

type(): MustacheTokenType

value

Gets the token value or variable name.

value(): str

  • returns: str - token value or variable name.