ast

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 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 Node

type Node interface {
	// contains filtered or unexported methods
}

Node represents a node in the ast tree. Only constructs implementing the Node inteface in this package can be added as child nodes.

type Partial

type Partial struct {
	Key    string
	Indent string
	Line   int
	Column int
}

Partial represents a mustache partial tag.

type Section

type Section struct {
	Key      []string
	Inverted bool
	LDelim   string
	RDelim   string
	Text     string
	Nodes    []Node
	Line     int
	Column   int
}

Section a mustache section tag.

func (*Section) Add

func (s *Section) Add(node Node)

Add appends a child node to the Section.

type Text

type Text struct {
	Text      string
	EndOfLine bool
}

Text node represents text exising between mustache tags. When EndOfLine is true, the text string is guaranteed to end with with \n or \r\n.

type Tree

type Tree struct {
	Name  string
	Nodes []Node
}

Tree is the representation of a single parsed template.

func (*Tree) Add

func (t *Tree) Add(node Node)

Add appends a child node to the Tree.

type Variable

type Variable struct {
	Key       []string
	Unescaped bool
	Line      int
	Column    int
}

Variable represents a mustache variable tag.

Jump to

Keyboard shortcuts

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