Documentation ¶
Index ¶
- Constants
- func BuildTreeView(rootname string, root Node, skipAtNodes bool) string
- func Choice(n Node) int
- func NewExtRefTreeElement(g parser.Grammar, node parser.TreeElement) parser.TreeElement
- func ToParserNode(g parser.Grammar, branch Branch) parser.TreeElement
- type Branch
- type Children
- type Extra
- type Leaf
- type Many
- type Node
- type One
Constants ¶
View Source
const ( RuleTag = "@rule" ChoiceTag = "@choice" SkipTag = "@skip" )
Variables ¶
This section is empty.
Functions ¶
func BuildTreeView ¶ added in v0.10.0
func Choice ¶ added in v0.11.0
Choice attempts to check for the @choice tag, and if found returns the value The return is the 0-based index of the chosen option. -1 means there was no @choice tag
func NewExtRefTreeElement ¶ added in v0.13.0
func NewExtRefTreeElement(g parser.Grammar, node parser.TreeElement) parser.TreeElement
func ToParserNode ¶ added in v0.6.0
func ToParserNode(g parser.Grammar, branch Branch) parser.TreeElement
Types ¶
type Branch ¶
func FromParserNode ¶ added in v0.6.0
func FromParserNode(g parser.Grammar, e parser.TreeElement) Branch
func (Branch) ContentEquals ¶ added in v0.14.0
type Children ¶
type Leaf ¶
func (Leaf) ContentEquals ¶ added in v0.14.0
type Node ¶
type Node interface { fmt.Stringer One(name string) Node Many(name string) []Node Scanner() parser.Scanner ContentEquals(n Node) bool // true if scanner and extra data contents are equivalent // contains filtered or unexported methods }
Click to show internal directories.
Click to hide internal directories.