Skip to main content

Class: UnlessTag

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.

Implements

Constructors

new UnlessTag()

new UnlessTag(): UnlessTag

Returns

UnlessTag

Properties

block

readonly block: true = true

Defined in

src/builtin/tags/unless.ts:47


end

readonly end: string = TAG_ENDUNLESS

Defined in

src/builtin/tags/unless.ts:49


name

readonly name: string = TAG_UNLESS

Defined in

src/builtin/tags/unless.ts:48


nodeClass

protected nodeClass: typeof UnlessNode = UnlessNode

Defined in

src/builtin/tags/unless.ts:50


END_ELSEIF_BLOCK

protected static END_ELSEIF_BLOCK: Set<string>

Defined in

src/builtin/tags/unless.ts:35


END_ELSE_BLOCK

protected static END_ELSE_BLOCK: Set<string>

Defined in

src/builtin/tags/unless.ts:41


END_IF_BLOCK

protected static END_IF_BLOCK: Set<string>

Defined in

src/builtin/tags/unless.ts:28

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

Node

Implementation of

Tag.parse

Defined in

src/builtin/tags/unless.ts:57


parseExpression()

protected parseExpression(stream): Expression

Parameters

stream: TokenStream

Returns

Expression

Defined in

src/builtin/tags/unless.ts:52