Documentation ¶
Overview ¶
Package template provides convenient access to groups of parsed Soy files.
Index ¶
- type Registry
- func (r *Registry) Add(soyfile *ast.SoyFileNode) error
- func (r *Registry) ColNumber(templateName string, node ast.Node) int
- func (r *Registry) Filename(templateName string) string
- func (r *Registry) LineNumber(templateName string, node ast.Node) int
- func (r *Registry) Template(name string) (Template, bool)
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct { SoyFiles []*ast.SoyFileNode Templates []Template // contains filtered or unexported fields }
Registry provides convenient access to a collection of parsed Soy templates.
func (*Registry) Add ¶
func (r *Registry) Add(soyfile *ast.SoyFileNode) error
Add the given Soy file node (and all contained templates) to this registry.
func (*Registry) ColNumber ¶
ColNumber computes the column number in the relevant line of input source for the given node within the given template.
func (*Registry) LineNumber ¶
LineNumber computes the line number in the input source for the given node within the given template.
type Template ¶
type Template struct { Doc *ast.SoyDocNode // this template's SoyDoc, w/ header params added to Doc.Params Node *ast.TemplateNode // this template's node Namespace *ast.NamespaceNode // this template's namespace }
Template is a Soy template's parse tree, including the relevant context (preceding soydoc and namespace).
Click to show internal directories.
Click to hide internal directories.