Documentation
¶
Overview ¶
Package htmlbind parses typed HTML template sources into an AST.
Index ¶
- func Generate(filename string, source []byte, options GenerateOptions) ([]byte, error)
- type Attribute
- type AttributePart
- type BinaryExpr
- type Body
- type CallExpr
- type CommentNode
- type CompileError
- type ComponentNode
- type ConditionalExpr
- type Declaration
- type DoctypeNode
- type ElementNode
- type EnumDecl
- type EnumMember
- type Expr
- type ExpressionNode
- type ExternalDecl
- type Field
- type ForNode
- type GenerateOptions
- type IdentifierExpr
- type IfNode
- type ImportDecl
- type IndexExpr
- type LiteralExpr
- type MemberExpr
- type Module
- type Node
- type PackageDecl
- type Parameter
- type ParseError
- type Position
- type TemplateDecl
- type TextNode
- type TypeDecl
- type TypeRef
- type UnaryExpr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attribute ¶
type Attribute struct {
Kind string `json:"kind"`
Pos Position `json:"pos"`
Name string `json:"name"`
Boolean bool `json:"boolean,omitempty"`
Value []AttributePart `json:"value,omitempty"`
}
type AttributePart ¶
type BinaryExpr ¶
type BinaryExpr = syntax.BinaryExpr
type CommentNode ¶
type CommentNode struct {
Kind string `json:"kind"`
Pos Position `json:"pos"`
Text string `json:"text"`
}
func (*CommentNode) NodeType ¶
func (n *CommentNode) NodeType() string
type CompileError ¶
func (*CompileError) Error ¶
func (e *CompileError) Error() string
type ComponentNode ¶
type ComponentNode struct {
Kind string `json:"kind"`
Pos Position `json:"pos"`
Name string `json:"name"`
Arguments []Attribute `json:"arguments,omitempty"`
Children []Node `json:"children,omitempty"`
SelfClosing bool `json:"selfClosing,omitempty"`
}
func (*ComponentNode) NodeType ¶
func (n *ComponentNode) NodeType() string
type ConditionalExpr ¶
type ConditionalExpr = syntax.ConditionalExpr
type Declaration ¶
type Declaration = syntax.Declaration
type DoctypeNode ¶
type DoctypeNode struct {
Kind string `json:"kind"`
Pos Position `json:"pos"`
Text string `json:"text"`
}
func (*DoctypeNode) NodeType ¶
func (n *DoctypeNode) NodeType() string
type ElementNode ¶
type ElementNode struct {
Kind string `json:"kind"`
Pos Position `json:"pos"`
Name string `json:"name"`
Attributes []Attribute `json:"attributes,omitempty"`
Children []Node `json:"children,omitempty"`
SelfClosing bool `json:"selfClosing,omitempty"`
}
func (*ElementNode) NodeType ¶
func (n *ElementNode) NodeType() string
type EnumMember ¶
type EnumMember = syntax.EnumMember
type ExpressionNode ¶
type ExpressionNode = syntax.ExpressionNode
type ExternalDecl ¶
type ExternalDecl = syntax.ExternalDecl
type GenerateOptions ¶
type GenerateOptions struct {
// Package overrides the template package/module declaration.
Package string
}
GenerateOptions controls the generated Go file.
type IdentifierExpr ¶
type IdentifierExpr = syntax.IdentifierExpr
type ImportDecl ¶
type ImportDecl = syntax.ImportDecl
type LiteralExpr ¶
type LiteralExpr = syntax.LiteralExpr
type MemberExpr ¶
type MemberExpr = syntax.MemberExpr
type PackageDecl ¶
type PackageDecl = syntax.PackageDecl
type ParseError ¶
type ParseError = syntax.ParseError
type TemplateDecl ¶
type TemplateDecl = syntax.TemplateDecl
Click to show internal directories.
Click to hide internal directories.