Type Alias: ChildNode
ChildNode:
object
An AST node and optional expression guarding that node.
Type declaration
blockScope?
optional
blockScope:string
[]
An array of names the parent node adds to its block. For example, the
for
tag adds the name "forloop" for the duration of its block.
expression?
optional
expression:Expression
An optional Expression
object related to the given Node
object.
loadContext?
optional
loadContext:ContextScope
Meta data a template loader might need to find the source of a partial template.
loadMode?
optional
loadMode:"render"
|"include"
|"extends"
If given, indicates that the associated expression should be used to load a partial template. In "render" mode, the partial will be analyzed in an isolated namespace, without access to the parent's template local scope. In "include" mode, the partial will have access to the parents template local scope and the parent's scope can be updated by the partial template too.
node?
optional
node:Node
An Node
object (some AST Nodes will have an Expression
without
an associated Node
). Typically a BlockNode
.
templateScope?
optional
templateScope:string
[]
An array of names the parent node adds to the template local
namespace. For example, the built-in assign
, capture
, increment
and decrement
tags all add names to the template local scope.
token
token:
Token
The token that started this node. Used for reporting line numbers.