Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token struct { // Type is the type of the token. Type TokenType // Literal is the literal value of the token. Literal string // Position is the position of the token in the input. Position int }
Token represents a token in the template.
type TokenType ¶
type TokenType string
TokenType represents the type of a token.
const ( // UNKNOWN represents an unknown token type. UNKNOWN TokenType = "UNKNOWN" // TEXT represents a text token type. TEXT TokenType = "TEXT" // OPEN represents an open tag token type. OPEN TokenType = "<%" // CLOSE represents a close tag token type. CLOSE TokenType = "%>" // EOF represents an end-of-file token type. EOF TokenType = "EOF" )
Token types
Click to show internal directories.
Click to hide internal directories.