Class: IfTag
A class that implements the Tag
interface is responsible for
parsing one or more tokens from a token stream, and returning
an ast.Node to be added into the abstract syntax tree.
Extended by
Implements
Constructors
new IfTag()
new IfTag():
IfTag
Returns
Properties
block
readonly
block:true
=true
Defined in
end
readonly
end:string
=TAG_ENDIF
Defined in
name
readonly
name:string
=TAG_IF
Defined in
nodeClass
protected
nodeClass: typeofIfNode
=IfNode
Defined in
END_ELSEIF_BLOCK
protected
static
END_ELSEIF_BLOCK:Set
<string
>
Defined in
END_ELSE_BLOCK
protected
static
END_ELSE_BLOCK:Set
<string
>
Defined in
END_IF_BLOCK
protected
static
END_IF_BLOCK:Set
<string
>
Defined in
Methods
parse()
parse(
stream
,environment
):Node
Create a syntax tree node by parsing tokens from the token stream.
If implementing a block tag (one with a start and end tag), the stream should be left with the end tag as its current token.
Parameters
• stream: TokenStream
A stream of template tokens.
• environment: Environment
The active environment.
Returns
Implementation of
Defined in
parseExpression()
protected
parseExpression(stream
):BooleanExpression
Parameters
• stream: TokenStream