Skip to main content

Class: BreakTag

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

new BreakTag(): BreakTag

Returns

BreakTag

Properties

block

readonly block: false = false

Defined in

src/builtin/tags/for.ts:21


name

readonly name: string = TAG_BREAK

Defined in

src/builtin/tags/for.ts:20

Methods

parse()

parse(stream): BreakNode

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

BreakNode

Implementation of

Tag.parse

Defined in

src/builtin/tags/for.ts:23