package
0.0.0-20241115082555-91616abce05b
Repository: https://github.com/tencentcodedog/linux-go-1.12.6.git
Documentation: pkg.go.dev

# Functions

IsEmptyTree reports whether this tree (node) is empty of everything but space.
New allocates a new parse tree with the given name.
NewIdentifier returns a new IdentifierNode with the given identifier name.
Parse returns a map from template name to parse.Tree, created by parsing the templates described in the argument string.

# Constants

A non-control action such as a field evaluation.
A boolean constant.
A sequence of field accesses.
An element of a pipeline.
The cursor, dot.
A field or method name.
An identifier; always a function name.
An if action.
A list of Nodes.
An untyped nil constant.
A numerical constant.
A pipeline of commands.
A range action.
A string constant.
A template invocation action.
Plain text.
A $ variable.
A with action.

# Structs

ActionNode holds an action (something bounded by delimiters).
BoolNode holds a boolean constant.
BranchNode is the common representation of if, range, and with.
ChainNode holds a term followed by a chain of field accesses (identifier starting with '.').
CommandNode holds a command (a pipeline inside an evaluating action).
DotNode holds the special identifier '.'.
FieldNode holds a field (identifier starting with '.').
IdentifierNode holds an identifier.
IfNode represents an {{if}} action and its commands.
ListNode holds a sequence of nodes.
NilNode holds the special identifier 'nil' representing an untyped nil constant.
NumberNode holds a number: signed or unsigned integer, float, or complex.
PipeNode holds a pipeline with optional declaration.
RangeNode represents a {{range}} action and its commands.
StringNode holds a string constant.
TemplateNode represents a {{template}} action.
TextNode holds plain text.
Tree is the representation of a single parsed template.
AssignNode holds a list of variable names, possibly with chained field accesses.
WithNode represents a {{with}} action and its commands.

# Interfaces

A Node is an element in the parse tree.

# Type aliases

NodeType identifies the type of a parse tree node.
Pos represents a byte position in the original input text from which this template was parsed.