token

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 2 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  Type
	Text  string
	Start int
	Line  int
}

func (*Token) String

func (t *Token) String() string

type Type

type Type string
const (
	EOF              Type = "eof"
	Error            Type = "error"
	LessThan         Type = "<"          // <
	GreaterThan      Type = ">"          // >
	Slash            Type = "/"          // /
	LessThanSlash    Type = "</"         // </
	SlashGreaterThan Type = "/>"         // />
	BackSlash        Type = "\\"         // \
	Identifier       Type = "identifier" // Any identifier
	Equal            Type = "="          // =
	Text             Type = "text"       // Raw text
	Expr             Type = "expr"       // { ... }
	OpenCurly        Type = "{"          // {
	CloseCurly       Type = "}"          // }
	String           Type = "string"     // "..." or '...'
	Space            Type = "space"      // Any whitespace

	Comment Type = "comment" // <!-- ... -->
)

Jump to

Keyboard shortcuts

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