Versions in this module Expand all Collapse all v0 v0.2.546 Jan 29, 2024 Changes in this version + type Attribute interface + IsAttribute func() bool + String func() string + type BoolConstantAttribute struct + Name string + func (bca BoolConstantAttribute) IsAttribute() bool + func (bca BoolConstantAttribute) String() string + type BoolExpressionAttribute struct + Expression Expression + Name string + func (ea BoolExpressionAttribute) IsAttribute() bool + func (ea BoolExpressionAttribute) String() string + type CSSProperty interface + IsCSSProperty func() bool + Write func(w io.Writer, indent int) error + type CSSTemplate struct + Name Expression + Properties []CSSProperty + func (css CSSTemplate) IsTemplateFileNode() bool + func (css CSSTemplate) Write(w io.Writer, indent int) error + type CallTemplateExpression struct + Expression Expression + func (cte CallTemplateExpression) IsNode() bool + func (cte CallTemplateExpression) Write(w io.Writer, indent int) error + type CaseExpression struct + Children []Node + Expression Expression + type ConstantAttribute struct + Name string + Value string + func (ca ConstantAttribute) IsAttribute() bool + func (ca ConstantAttribute) String() string + type ConstantCSSProperty struct + Name string + Value string + func (c ConstantCSSProperty) IsCSSProperty() bool + func (c ConstantCSSProperty) Write(w io.Writer, indent int) error + type DocType struct + Value string + func (dt DocType) IsNode() bool + func (dt DocType) Write(w io.Writer, indent int) error + type Element struct + Attributes []Attribute + Children []Node + Name string + func (e Element) IsNode() bool + func (e Element) IsVoidElement() bool + func (e Element) Validate() (msgs []string, ok bool) + func (e Element) Write(w io.Writer, indent int) error + type Expression struct + Range Range + Value string + func NewExpression(value string, from, to Position) Expression + type ExpressionAttribute struct + Expression Expression + Name string + func (ea ExpressionAttribute) IsAttribute() bool + func (ea ExpressionAttribute) String() string + type ExpressionCSSProperty struct + Name string + Value StringExpression + func (c ExpressionCSSProperty) IsCSSProperty() bool + func (c ExpressionCSSProperty) Write(w io.Writer, indent int) error + type ForExpression struct + Children []Node + Expression Expression + func (fe ForExpression) IsNode() bool + func (fe ForExpression) Write(w io.Writer, indent int) error + type HTMLTemplate struct + Children []Node + Name Expression + Parameters Expression + func (t HTMLTemplate) IsTemplateFileNode() bool + func (t HTMLTemplate) Write(w io.Writer, indent int) error + type IfExpression struct + Else []Node + Expression Expression + Then []Node + func (n IfExpression) IsNode() bool + func (n IfExpression) Write(w io.Writer, indent int) error + type Import struct + Expression Expression + func (imp Import) Write(w io.Writer, indent int) error + type Node interface + IsNode func() bool + Write func(w io.Writer, indent int) error + type Package struct + Expression Expression + func (p Package) Write(w io.Writer, indent int) error + type ParseError struct + From Position + Message string + To Position + func (pe ParseError) Error() string + type Position struct + Col int + Index int64 + Line int + func NewPosition() Position + func NewPositionFromInput(pi parse.Input) Position + func NewPositionFromValues(index int64, line, col int) Position + func (p Position) String() string + type Range struct + From Position + To Position + func NewRange(from, to Position) Range + type ScriptTemplate struct + Name Expression + Parameters Expression + Value string + func (s ScriptTemplate) IsTemplateFileNode() bool + func (s ScriptTemplate) Write(w io.Writer, indent int) error + type SourceExpressionTo struct + Source Expression + Target Range + type SourceMap struct + Items []SourceExpressionTo + func NewSourceMap() *SourceMap + func (sm *SourceMap) Add(src Expression, tgt Range) (updatedFrom Position) + func (sm *SourceMap) SourcePositionFromTarget(line, col int) (src Position, mapping SourceExpressionTo, ok bool) + func (sm *SourceMap) TargetPositionFromSource(line, col int) (tgt Position, mapping SourceExpressionTo, ok bool) + type StringExpression struct + Expression Expression + func (se StringExpression) IsNode() bool + func (se StringExpression) IsStyleDeclarationValue() bool + func (se StringExpression) Write(w io.Writer, indent int) error + type SwitchExpression struct + Cases []CaseExpression + Default []Node + Expression Expression + func (se SwitchExpression) IsNode() bool + func (se SwitchExpression) Write(w io.Writer, indent int) error + type TemplateFile struct + Imports []Import + Nodes []TemplateFileNode + Package Package + func Parse(fileName string) (TemplateFile, error) + func ParseString(template string) (TemplateFile, error) + func (tf TemplateFile) Write(w io.Writer) error + type TemplateFileNode interface + IsTemplateFileNode func() bool + Write func(w io.Writer, indent int) error + type TemplateFileParser struct + DefaultPackage string + func NewTemplateFileParser(pkg string) TemplateFileParser + func (p TemplateFileParser) Parse(pi parse.Input) parse.Result + type Text struct + Value string + func (t Text) IsNode() bool + func (t Text) Write(w io.Writer, indent int) error + type Whitespace struct + Value string + func (ws Whitespace) IsNode() bool + func (ws Whitespace) Write(w io.Writer, indent int) error