compiler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildrenCommandNode

type ChildrenCommandNode struct {
	// contains filtered or unexported fields
}

func NewChildrenCommandNode

func NewChildrenCommandNode(t token) *ChildrenCommandNode

func (*ChildrenCommandNode) AddChild

func (n *ChildrenCommandNode) AddChild(c nodeBase)

func (*ChildrenCommandNode) Children

func (n *ChildrenCommandNode) Children() []nodeBase

func (*ChildrenCommandNode) Indent

func (n *ChildrenCommandNode) Indent() int

func (*ChildrenCommandNode) Origin

func (n *ChildrenCommandNode) Origin() token

func (*ChildrenCommandNode) Source

func (n *ChildrenCommandNode) Source(tw *templateWriter) error

func (*ChildrenCommandNode) Tree

func (n *ChildrenCommandNode) Tree(buf *bytes.Buffer, indent int) string

func (*ChildrenCommandNode) Type

func (n *ChildrenCommandNode) Type() nodeType

type CodeNode

type CodeNode struct {
	// contains filtered or unexported fields
}

func NewCodeNode

func NewCodeNode(t token) *CodeNode

func (*CodeNode) AddChild

func (n *CodeNode) AddChild(c nodeBase)

func (*CodeNode) Children

func (n *CodeNode) Children() []nodeBase

func (*CodeNode) Indent

func (n *CodeNode) Indent() int

func (*CodeNode) Origin

func (n *CodeNode) Origin() token

func (*CodeNode) Source

func (n *CodeNode) Source(tw *templateWriter) error

func (*CodeNode) Tree

func (n *CodeNode) Tree(buf *bytes.Buffer, indent int) string

func (*CodeNode) Type

func (n *CodeNode) Type() nodeType

type CommentNode

type CommentNode struct {
	// contains filtered or unexported fields
}

func NewCommentNode

func NewCommentNode(t token, indent int) *CommentNode

func (*CommentNode) AddChild

func (n *CommentNode) AddChild(c nodeBase)

func (*CommentNode) Children

func (n *CommentNode) Children() []nodeBase

func (*CommentNode) Indent

func (n *CommentNode) Indent() int

func (*CommentNode) Origin

func (n *CommentNode) Origin() token

func (*CommentNode) Source

func (n *CommentNode) Source(tw *templateWriter) error

func (*CommentNode) Tree

func (n *CommentNode) Tree(buf *bytes.Buffer, indent int) string

func (*CommentNode) Type

func (n *CommentNode) Type() nodeType

type CssFilterNode

type CssFilterNode struct {
	// contains filtered or unexported fields
}

func NewCssFilterNode

func NewCssFilterNode(t token, indent int) *CssFilterNode

func (*CssFilterNode) AddChild

func (n *CssFilterNode) AddChild(c nodeBase)

func (*CssFilterNode) Children

func (n *CssFilterNode) Children() []nodeBase

func (*CssFilterNode) Indent

func (n *CssFilterNode) Indent() int

func (*CssFilterNode) Origin

func (n *CssFilterNode) Origin() token

func (*CssFilterNode) Source

func (n *CssFilterNode) Source(tw *templateWriter) error

func (*CssFilterNode) Tree

func (n *CssFilterNode) Tree(buf *bytes.Buffer, indent int) string

func (*CssFilterNode) Type

func (n *CssFilterNode) Type() nodeType

type DoctypeNode

type DoctypeNode struct {
	// contains filtered or unexported fields
}

func NewDoctypeNode

func NewDoctypeNode(t token) *DoctypeNode

func (*DoctypeNode) AddChild

func (n *DoctypeNode) AddChild(c nodeBase)

func (*DoctypeNode) Children

func (n *DoctypeNode) Children() []nodeBase

func (*DoctypeNode) Indent

func (n *DoctypeNode) Indent() int

func (*DoctypeNode) Origin

func (n *DoctypeNode) Origin() token

func (*DoctypeNode) Source

func (n *DoctypeNode) Source(tw *templateWriter) error

func (*DoctypeNode) Tree

func (n *DoctypeNode) Tree(buf *bytes.Buffer, indent int) string

func (*DoctypeNode) Type

func (n *DoctypeNode) Type() nodeType

type ElementNode

type ElementNode struct {
	// contains filtered or unexported fields
}

func NewElementNode

func NewElementNode(t token, indent int) *ElementNode

func (*ElementNode) AddChild

func (n *ElementNode) AddChild(c nodeBase)

func (*ElementNode) Children

func (n *ElementNode) Children() []nodeBase

func (*ElementNode) Indent

func (n *ElementNode) Indent() int

func (*ElementNode) Origin

func (n *ElementNode) Origin() token

func (*ElementNode) Source

func (n *ElementNode) Source(tw *templateWriter) error

func (*ElementNode) Tree

func (n *ElementNode) Tree(buf *bytes.Buffer, indent int) string

func (*ElementNode) Type

func (n *ElementNode) Type() nodeType

type HmltNode

type HmltNode struct {
	// contains filtered or unexported fields
}

func NewHmltNode

func NewHmltNode(t token) *HmltNode

func (*HmltNode) AddChild

func (n *HmltNode) AddChild(c nodeBase)

func (*HmltNode) Children

func (n *HmltNode) Children() []nodeBase

func (*HmltNode) Indent

func (n *HmltNode) Indent() int

func (*HmltNode) Origin

func (n *HmltNode) Origin() token

func (*HmltNode) Source

func (n *HmltNode) Source(tw *templateWriter) error

func (*HmltNode) Tree

func (n *HmltNode) Tree(buf *bytes.Buffer, indent int) string

func (*HmltNode) Type

func (n *HmltNode) Type() nodeType

type JavaScriptFilterNode

type JavaScriptFilterNode struct {
	// contains filtered or unexported fields
}

func NewJavaScriptFilterNode

func NewJavaScriptFilterNode(t token, indent int) *JavaScriptFilterNode

func (*JavaScriptFilterNode) AddChild

func (n *JavaScriptFilterNode) AddChild(c nodeBase)

func (*JavaScriptFilterNode) Children

func (n *JavaScriptFilterNode) Children() []nodeBase

func (*JavaScriptFilterNode) Indent

func (n *JavaScriptFilterNode) Indent() int

func (*JavaScriptFilterNode) Origin

func (n *JavaScriptFilterNode) Origin() token

func (*JavaScriptFilterNode) Source

func (n *JavaScriptFilterNode) Source(tw *templateWriter) error

func (*JavaScriptFilterNode) Tree

func (n *JavaScriptFilterNode) Tree(buf *bytes.Buffer, indent int) string

func (*JavaScriptFilterNode) Type

func (n *JavaScriptFilterNode) Type() nodeType

type NewLineNode

type NewLineNode struct {
	// contains filtered or unexported fields
}

func NewNewLineNode

func NewNewLineNode(t token) *NewLineNode

func (*NewLineNode) AddChild

func (n *NewLineNode) AddChild(c nodeBase)

func (*NewLineNode) Children

func (n *NewLineNode) Children() []nodeBase

func (*NewLineNode) Indent

func (n *NewLineNode) Indent() int

func (*NewLineNode) Origin

func (n *NewLineNode) Origin() token

func (*NewLineNode) Source

func (n *NewLineNode) Source(tw *templateWriter) error

func (*NewLineNode) Tree

func (n *NewLineNode) Tree(buf *bytes.Buffer, indent int) string

func (*NewLineNode) Type

func (n *NewLineNode) Type() nodeType

type OrderedMap

type OrderedMap[T any] struct {
	// contains filtered or unexported fields
}

func NewOrderedMap

func NewOrderedMap[T any]() *OrderedMap[T]

func (*OrderedMap[T]) Delete

func (m *OrderedMap[T]) Delete(key string)

func (*OrderedMap[T]) Get

func (m *OrderedMap[T]) Get(key string) (value T, ok bool)

func (*OrderedMap[T]) Len

func (m *OrderedMap[T]) Len() int

func (*OrderedMap[T]) Range

func (m *OrderedMap[T]) Range(f func(key string, value T) (bool, error)) error

func (*OrderedMap[T]) Set

func (m *OrderedMap[T]) Set(key string, value T)

type RenderCommandNode

type RenderCommandNode struct {
	// contains filtered or unexported fields
}

func NewRenderCommandNode

func NewRenderCommandNode(t token, indent int) *RenderCommandNode

func (*RenderCommandNode) AddChild

func (n *RenderCommandNode) AddChild(c nodeBase)

func (*RenderCommandNode) Children

func (n *RenderCommandNode) Children() []nodeBase

func (*RenderCommandNode) Indent

func (n *RenderCommandNode) Indent() int

func (*RenderCommandNode) Origin

func (n *RenderCommandNode) Origin() token

func (*RenderCommandNode) Source

func (n *RenderCommandNode) Source(tw *templateWriter) error

func (*RenderCommandNode) Tree

func (n *RenderCommandNode) Tree(buf *bytes.Buffer, indent int) string

func (*RenderCommandNode) Type

func (n *RenderCommandNode) Type() nodeType

type RootNode

type RootNode struct {
	// contains filtered or unexported fields
}

func NewRootNode

func NewRootNode() *RootNode

func (*RootNode) AddChild

func (n *RootNode) AddChild(c nodeBase)

func (*RootNode) Children

func (n *RootNode) Children() []nodeBase

func (*RootNode) Indent

func (n *RootNode) Indent() int

func (*RootNode) Origin

func (n *RootNode) Origin() token

func (*RootNode) Source

func (n *RootNode) Source(tw *templateWriter) error

func (*RootNode) Tree

func (n *RootNode) Tree(buf *bytes.Buffer, indent int) string

func (*RootNode) Type

func (n *RootNode) Type() nodeType

type ScriptNode

type ScriptNode struct {
	// contains filtered or unexported fields
}

func NewScriptNode

func NewScriptNode(t token) *ScriptNode

func (*ScriptNode) AddChild

func (n *ScriptNode) AddChild(c nodeBase)

func (*ScriptNode) Children

func (n *ScriptNode) Children() []nodeBase

func (*ScriptNode) Indent

func (n *ScriptNode) Indent() int

func (*ScriptNode) Origin

func (n *ScriptNode) Origin() token

func (*ScriptNode) Source

func (n *ScriptNode) Source(tw *templateWriter) error

func (*ScriptNode) Tree

func (n *ScriptNode) Tree(buf *bytes.Buffer, indent int) string

func (*ScriptNode) Type

func (n *ScriptNode) Type() nodeType

type SilentScriptNode

type SilentScriptNode struct {
	// contains filtered or unexported fields
}

func NewSilentScriptNode

func NewSilentScriptNode(t token, indent int) *SilentScriptNode

func (*SilentScriptNode) AddChild

func (n *SilentScriptNode) AddChild(c nodeBase)

func (*SilentScriptNode) Children

func (n *SilentScriptNode) Children() []nodeBase

func (*SilentScriptNode) Indent

func (n *SilentScriptNode) Indent() int

func (*SilentScriptNode) Origin

func (n *SilentScriptNode) Origin() token

func (*SilentScriptNode) Source

func (n *SilentScriptNode) Source(tw *templateWriter) error

func (*SilentScriptNode) Tree

func (n *SilentScriptNode) Tree(buf *bytes.Buffer, indent int) string

func (*SilentScriptNode) Type

func (n *SilentScriptNode) Type() nodeType

type Template

type Template struct {
	Filename string
	Root     nodeBase
}

func ParseFile

func ParseFile(fileName string) (*Template, error)

func ParseString

func ParseString(contents string) (*Template, error)

func (*Template) Compose

func (t *Template) Compose(w io.Writer) error

type TextFilterNode

type TextFilterNode struct {
	// contains filtered or unexported fields
}

func NewTextFilterNode

func NewTextFilterNode(t token, indent int) *TextFilterNode

func (*TextFilterNode) AddChild

func (n *TextFilterNode) AddChild(c nodeBase)

func (*TextFilterNode) Children

func (n *TextFilterNode) Children() []nodeBase

func (*TextFilterNode) Indent

func (n *TextFilterNode) Indent() int

func (*TextFilterNode) Origin

func (n *TextFilterNode) Origin() token

func (*TextFilterNode) Source

func (n *TextFilterNode) Source(tw *templateWriter) error

func (*TextFilterNode) Tree

func (n *TextFilterNode) Tree(buf *bytes.Buffer, indent int) string

func (*TextFilterNode) Type

func (n *TextFilterNode) Type() nodeType

type TextNode

type TextNode struct {
	// contains filtered or unexported fields
}

func NewTextNode

func NewTextNode(t token) *TextNode

func (*TextNode) AddChild

func (n *TextNode) AddChild(c nodeBase)

func (*TextNode) Children

func (n *TextNode) Children() []nodeBase

func (*TextNode) Indent

func (n *TextNode) Indent() int

func (*TextNode) Origin

func (n *TextNode) Origin() token

func (*TextNode) Source

func (n *TextNode) Source(tw *templateWriter) error

func (*TextNode) Tree

func (n *TextNode) Tree(buf *bytes.Buffer, indent int) string

func (*TextNode) Type

func (n *TextNode) Type() nodeType

type UnescapeNode

type UnescapeNode struct {
	// contains filtered or unexported fields
}

func NewUnescapeNode

func NewUnescapeNode(t token, indent int) *UnescapeNode

func (*UnescapeNode) AddChild

func (n *UnescapeNode) AddChild(c nodeBase)

func (*UnescapeNode) Children

func (n *UnescapeNode) Children() []nodeBase

func (*UnescapeNode) Indent

func (n *UnescapeNode) Indent() int

func (*UnescapeNode) Origin

func (n *UnescapeNode) Origin() token

func (*UnescapeNode) Source

func (n *UnescapeNode) Source(tw *templateWriter) error

func (*UnescapeNode) Tree

func (n *UnescapeNode) Tree(buf *bytes.Buffer, indent int) string

func (*UnescapeNode) Type

func (n *UnescapeNode) Type() nodeType

Jump to

Keyboard shortcuts

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