token

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 0 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL