Skip to main content

Class: AssignTag

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 AssignTag()

new AssignTag(): AssignTag

Returns

AssignTag

Properties

block

readonly block: false = false

Defined in

src/builtin/tags/assign.ts:16


name

readonly name: string = "assign"

Defined in

src/builtin/tags/assign.ts:17


nodeClass

protected nodeClass: typeof AssignNode = AssignNode

Defined in

src/builtin/tags/assign.ts:18


RE_ASSIGN

protected static RE_ASSIGN: RegExp

Defined in

src/builtin/tags/assign.ts:11

Methods

parse()

parse(stream): 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.

Returns

Node

Implementation of

Tag.parse

Defined in

src/builtin/tags/assign.ts:24


parseExpression()

protected parseExpression(value, startIndex): Expression

Parameters

value: string

startIndex: number

Returns

Expression

Defined in

src/builtin/tags/assign.ts:20