Documentation
¶
Index ¶
- type ChildrenCommandNode
- func (n *ChildrenCommandNode) AddChild(c nodeBase)
- func (n *ChildrenCommandNode) Children() []nodeBase
- func (n *ChildrenCommandNode) Indent() int
- func (n *ChildrenCommandNode) Origin() token
- func (n *ChildrenCommandNode) SetNextSibling(sibling nodeBase)
- func (n *ChildrenCommandNode) Source(tw *templateWriter) error
- func (n *ChildrenCommandNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *ChildrenCommandNode) Type() nodeType
- type CodeNode
- func (n *CodeNode) AddChild(c nodeBase)
- func (n *CodeNode) Children() []nodeBase
- func (n *CodeNode) Indent() int
- func (n *CodeNode) Origin() token
- func (n *CodeNode) SetNextSibling(sibling nodeBase)
- func (n *CodeNode) Source(tw *templateWriter) error
- func (n *CodeNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *CodeNode) Type() nodeType
- type CommentNode
- func (n *CommentNode) AddChild(c nodeBase)
- func (n *CommentNode) Children() []nodeBase
- func (n *CommentNode) Indent() int
- func (n *CommentNode) Origin() token
- func (n *CommentNode) SetNextSibling(sibling nodeBase)
- func (n *CommentNode) Source(tw *templateWriter) error
- func (n *CommentNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *CommentNode) Type() nodeType
- type CssFilterNode
- func (n *CssFilterNode) AddChild(c nodeBase)
- func (n *CssFilterNode) Children() []nodeBase
- func (n *CssFilterNode) Indent() int
- func (n *CssFilterNode) Origin() token
- func (n *CssFilterNode) SetNextSibling(sibling nodeBase)
- func (n *CssFilterNode) Source(tw *templateWriter) error
- func (n *CssFilterNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *CssFilterNode) Type() nodeType
- type DoctypeNode
- func (n *DoctypeNode) AddChild(c nodeBase)
- func (n *DoctypeNode) Children() []nodeBase
- func (n *DoctypeNode) Indent() int
- func (n *DoctypeNode) Origin() token
- func (n *DoctypeNode) SetNextSibling(sibling nodeBase)
- func (n *DoctypeNode) Source(tw *templateWriter) error
- func (n *DoctypeNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *DoctypeNode) Type() nodeType
- type ElementNode
- func (n *ElementNode) AddChild(c nodeBase)
- func (n *ElementNode) Children() []nodeBase
- func (n *ElementNode) Indent() int
- func (n *ElementNode) Origin() token
- func (n *ElementNode) SetNextSibling(sibling nodeBase)
- func (n *ElementNode) Source(tw *templateWriter) error
- func (n *ElementNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *ElementNode) Type() nodeType
- type JavaScriptFilterNode
- func (n *JavaScriptFilterNode) AddChild(c nodeBase)
- func (n *JavaScriptFilterNode) Children() []nodeBase
- func (n *JavaScriptFilterNode) Indent() int
- func (n *JavaScriptFilterNode) Origin() token
- func (n *JavaScriptFilterNode) SetNextSibling(sibling nodeBase)
- func (n *JavaScriptFilterNode) Source(tw *templateWriter) error
- func (n *JavaScriptFilterNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *JavaScriptFilterNode) Type() nodeType
- type NewLineNode
- func (n *NewLineNode) AddChild(c nodeBase)
- func (n *NewLineNode) Children() []nodeBase
- func (n *NewLineNode) Indent() int
- func (n *NewLineNode) Origin() token
- func (n *NewLineNode) SetNextSibling(sibling nodeBase)
- func (n *NewLineNode) Source(tw *templateWriter) error
- func (n *NewLineNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *NewLineNode) Type() nodeType
- type OrderedMap
- type Position
- type PositionalError
- type Range
- type RawTextNode
- func (n *RawTextNode) AddChild(c nodeBase)
- func (n *RawTextNode) Children() []nodeBase
- func (n *RawTextNode) Indent() int
- func (n *RawTextNode) Origin() token
- func (n *RawTextNode) SetNextSibling(sibling nodeBase)
- func (n *RawTextNode) Source(tw *templateWriter) error
- func (n *RawTextNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *RawTextNode) Type() nodeType
- type RenderCommandNode
- func (n *RenderCommandNode) AddChild(c nodeBase)
- func (n *RenderCommandNode) Children() []nodeBase
- func (n *RenderCommandNode) Indent() int
- func (n *RenderCommandNode) Origin() token
- func (n *RenderCommandNode) SetNextSibling(sibling nodeBase)
- func (n *RenderCommandNode) Source(tw *templateWriter) error
- func (n *RenderCommandNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *RenderCommandNode) Type() nodeType
- type RootNode
- func (n *RootNode) AddChild(c nodeBase)
- func (n *RootNode) Children() []nodeBase
- func (n *RootNode) Indent() int
- func (n *RootNode) Origin() token
- func (n *RootNode) SetNextSibling(sibling nodeBase)
- func (n *RootNode) Source(tw *templateWriter) error
- func (n *RootNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *RootNode) Type() nodeType
- type ScriptNode
- func (n *ScriptNode) AddChild(c nodeBase)
- func (n *ScriptNode) Children() []nodeBase
- func (n *ScriptNode) Indent() int
- func (n *ScriptNode) Origin() token
- func (n *ScriptNode) SetNextSibling(sibling nodeBase)
- func (n *ScriptNode) Source(tw *templateWriter) error
- func (n *ScriptNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *ScriptNode) Type() nodeType
- type SilentScriptNode
- func (n *SilentScriptNode) AddChild(c nodeBase)
- func (n *SilentScriptNode) Children() []nodeBase
- func (n *SilentScriptNode) Indent() int
- func (n *SilentScriptNode) Origin() token
- func (n *SilentScriptNode) SetNextSibling(sibling nodeBase)
- func (n *SilentScriptNode) Source(tw *templateWriter) error
- func (n *SilentScriptNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *SilentScriptNode) Type() nodeType
- type SlotCommandNode
- func (n *SlotCommandNode) AddChild(c nodeBase)
- func (n *SlotCommandNode) Children() []nodeBase
- func (n *SlotCommandNode) Indent() int
- func (n *SlotCommandNode) Origin() token
- func (n *SlotCommandNode) SetNextSibling(sibling nodeBase)
- func (n *SlotCommandNode) Source(tw *templateWriter) error
- func (n *SlotCommandNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *SlotCommandNode) Type() nodeType
- type SourceMap
- type Template
- type TemplateNode
- func (n *TemplateNode) AddChild(c nodeBase)
- func (n *TemplateNode) Children() []nodeBase
- func (n *TemplateNode) Indent() int
- func (n *TemplateNode) Origin() token
- func (n *TemplateNode) SetNextSibling(sibling nodeBase)
- func (n *TemplateNode) Source(tw *templateWriter) error
- func (n *TemplateNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *TemplateNode) Type() nodeType
- type TextFilterNode
- func (n *TextFilterNode) AddChild(c nodeBase)
- func (n *TextFilterNode) Children() []nodeBase
- func (n *TextFilterNode) Indent() int
- func (n *TextFilterNode) Origin() token
- func (n *TextFilterNode) SetNextSibling(sibling nodeBase)
- func (n *TextFilterNode) Source(tw *templateWriter) error
- func (n *TextFilterNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *TextFilterNode) Type() nodeType
- type TextNode
- func (n *TextNode) AddChild(c nodeBase)
- func (n *TextNode) Children() []nodeBase
- func (n *TextNode) Indent() int
- func (n *TextNode) Origin() token
- func (n *TextNode) SetNextSibling(sibling nodeBase)
- func (n *TextNode) Source(tw *templateWriter) error
- func (n *TextNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *TextNode) Type() nodeType
- type UnescapeNode
- func (n *UnescapeNode) AddChild(c nodeBase)
- func (n *UnescapeNode) Children() []nodeBase
- func (n *UnescapeNode) Indent() int
- func (n *UnescapeNode) Origin() token
- func (n *UnescapeNode) SetNextSibling(sibling nodeBase)
- func (n *UnescapeNode) Source(tw *templateWriter) error
- func (n *UnescapeNode) Tree(buf *bytes.Buffer, indent int) string
- func (n *UnescapeNode) Type() nodeType
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) SetNextSibling ¶
func (n *ChildrenCommandNode) SetNextSibling(sibling nodeBase)
func (*ChildrenCommandNode) Source ¶
func (n *ChildrenCommandNode) Source(tw *templateWriter) error
type CodeNode ¶
type CodeNode struct {
// contains filtered or unexported fields
}
func NewCodeNode ¶
func NewCodeNode(t token) *CodeNode
func (*CodeNode) SetNextSibling ¶
func (n *CodeNode) SetNextSibling(sibling nodeBase)
type CommentNode ¶
type CommentNode struct {
// contains filtered or unexported fields
}
func NewCommentNode ¶
func NewCommentNode(t token, indent int, keepNewlines bool) *CommentNode
func (*CommentNode) SetNextSibling ¶
func (n *CommentNode) SetNextSibling(sibling nodeBase)
func (*CommentNode) Source ¶
func (n *CommentNode) Source(tw *templateWriter) error
type CssFilterNode ¶
type CssFilterNode struct {
// contains filtered or unexported fields
}
func NewCssFilterNode ¶
func NewCssFilterNode(t token, indent int) *CssFilterNode
func (*CssFilterNode) SetNextSibling ¶
func (n *CssFilterNode) SetNextSibling(sibling nodeBase)
func (*CssFilterNode) Source ¶
func (n *CssFilterNode) Source(tw *templateWriter) error
type DoctypeNode ¶
type DoctypeNode struct {
// contains filtered or unexported fields
}
func NewDoctypeNode ¶
func NewDoctypeNode(t token) *DoctypeNode
func (*DoctypeNode) SetNextSibling ¶
func (n *DoctypeNode) SetNextSibling(sibling nodeBase)
func (*DoctypeNode) Source ¶
func (n *DoctypeNode) Source(tw *templateWriter) error
type ElementNode ¶
type ElementNode struct {
// contains filtered or unexported fields
}
func NewElementNode ¶
func NewElementNode(t token, indent int, keepNewlines bool) *ElementNode
func (*ElementNode) SetNextSibling ¶
func (n *ElementNode) SetNextSibling(sibling nodeBase)
func (*ElementNode) Source ¶
func (n *ElementNode) Source(tw *templateWriter) error
type JavaScriptFilterNode ¶
type JavaScriptFilterNode struct {
// contains filtered or unexported fields
}
func NewJavaScriptFilterNode ¶
func NewJavaScriptFilterNode(t token, indent int) *JavaScriptFilterNode
func (*JavaScriptFilterNode) SetNextSibling ¶
func (n *JavaScriptFilterNode) SetNextSibling(sibling nodeBase)
func (*JavaScriptFilterNode) Source ¶
func (n *JavaScriptFilterNode) Source(tw *templateWriter) error
type NewLineNode ¶
type NewLineNode struct {
// contains filtered or unexported fields
}
func NewNewLineNode ¶
func NewNewLineNode(t token) *NewLineNode
func (*NewLineNode) SetNextSibling ¶
func (n *NewLineNode) SetNextSibling(sibling nodeBase)
func (*NewLineNode) Source ¶
func (n *NewLineNode) Source(tw *templateWriter) error
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 PositionalError ¶
func (PositionalError) Error ¶
func (e PositionalError) Error() string
func (PositionalError) Position ¶
func (e PositionalError) Position() string
func (PositionalError) Unwrap ¶
func (e PositionalError) Unwrap() error
type RawTextNode ¶ added in v0.7.0
type RawTextNode struct {
// contains filtered or unexported fields
}
func NewRawTextNode ¶ added in v0.7.0
func NewRawTextNode(t token, indent int) *RawTextNode
func (*RawTextNode) SetNextSibling ¶ added in v0.7.0
func (n *RawTextNode) SetNextSibling(sibling nodeBase)
func (*RawTextNode) Source ¶ added in v0.7.0
func (n *RawTextNode) Source(tw *templateWriter) error
type RenderCommandNode ¶
type RenderCommandNode struct {
// contains filtered or unexported fields
}
func NewRenderCommandNode ¶
func NewRenderCommandNode(t token, indent int, keepNewlines bool) *RenderCommandNode
func (*RenderCommandNode) SetNextSibling ¶
func (n *RenderCommandNode) SetNextSibling(sibling nodeBase)
func (*RenderCommandNode) Source ¶
func (n *RenderCommandNode) Source(tw *templateWriter) error
type RootNode ¶
type RootNode struct {
// contains filtered or unexported fields
}
func NewRootNode ¶
func NewRootNode() *RootNode
func (*RootNode) SetNextSibling ¶
func (n *RootNode) SetNextSibling(sibling nodeBase)
type ScriptNode ¶
type ScriptNode struct {
// contains filtered or unexported fields
}
func NewScriptNode ¶
func NewScriptNode(t token, keepNewlines bool) *ScriptNode
func (*ScriptNode) SetNextSibling ¶
func (n *ScriptNode) SetNextSibling(sibling nodeBase)
func (*ScriptNode) Source ¶
func (n *ScriptNode) Source(tw *templateWriter) error
type SilentScriptNode ¶
type SilentScriptNode struct {
// contains filtered or unexported fields
}
func NewSilentScriptNode ¶
func NewSilentScriptNode(t token, indent int, keepNewlines bool) *SilentScriptNode
func (*SilentScriptNode) SetNextSibling ¶
func (n *SilentScriptNode) SetNextSibling(sibling nodeBase)
func (*SilentScriptNode) Source ¶
func (n *SilentScriptNode) Source(tw *templateWriter) error
type SlotCommandNode ¶ added in v0.8.0
type SlotCommandNode struct {
// contains filtered or unexported fields
}
func NewSlotCommandNode ¶ added in v0.8.0
func NewSlotCommandNode(t token, indent int, keepNewlines bool) *SlotCommandNode
func (*SlotCommandNode) SetNextSibling ¶ added in v0.8.0
func (n *SlotCommandNode) SetNextSibling(sibling nodeBase)
func (*SlotCommandNode) Source ¶ added in v0.8.0
func (n *SlotCommandNode) Source(tw *templateWriter) error
type SourceMap ¶
type SourceMap struct { SourceLinesToTarget map[int]map[int]Position TargetLinesToSource map[int]map[int]Position }
func (*SourceMap) Add ¶
Add will create a new source map entry from the Goht template to the generated Go code.
The IDEs will be using zero-based line and column numbers, so we need to convert them from the one-based line and column numbers that we've generated during the parsing of the Goht template.
When we parse the length of a line we will create mappings for the entire len() because the IDEs and LSPs will use the character AFTER the last character in the range as the end position. For example, "foo" will have a start column of 0 and an end column value of 3, not 2.
func (*SourceMap) SourcePositionFromTarget ¶
type TemplateNode ¶ added in v0.6.0
type TemplateNode struct {
// contains filtered or unexported fields
}
func NewTemplateNode ¶ added in v0.6.0
func NewTemplateNode(t token) *TemplateNode
func (*TemplateNode) SetNextSibling ¶ added in v0.6.0
func (n *TemplateNode) SetNextSibling(sibling nodeBase)
func (*TemplateNode) Source ¶ added in v0.6.0
func (n *TemplateNode) Source(tw *templateWriter) error
type TextFilterNode ¶
type TextFilterNode struct {
// contains filtered or unexported fields
}
func NewTextFilterNode ¶
func NewTextFilterNode(t token, indent int) *TextFilterNode
func (*TextFilterNode) SetNextSibling ¶
func (n *TextFilterNode) SetNextSibling(sibling nodeBase)
func (*TextFilterNode) Source ¶
func (n *TextFilterNode) Source(tw *templateWriter) error
type TextNode ¶
type TextNode struct {
// contains filtered or unexported fields
}
func NewTextNode ¶
func NewTextNode(t token) *TextNode
func (*TextNode) SetNextSibling ¶
func (n *TextNode) SetNextSibling(sibling nodeBase)
type UnescapeNode ¶
type UnescapeNode struct {
// contains filtered or unexported fields
}
func NewUnescapeNode ¶
func NewUnescapeNode(t token, indent int) *UnescapeNode
func (*UnescapeNode) SetNextSibling ¶
func (n *UnescapeNode) SetNextSibling(sibling nodeBase)
func (*UnescapeNode) Source ¶
func (n *UnescapeNode) Source(tw *templateWriter) error
Click to show internal directories.
Click to hide internal directories.