Documentation ¶
Overview ¶
Package template provides convenient access to groups of parsed soy files.
Index ¶
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) LineNumber ¶
LineNumber computes the line number in the input source for the given node within the given template.
func (*Registry) SourceFile ¶
SourceFile gets the source file for templateName
type Template ¶
type Template struct { Doc *ast.SoyDocNode // this template's SoyDoc 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 (preceeding soydoc and namespace).
Click to show internal directories.
Click to hide internal directories.