Skip to main content

Class: CommentTag

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

new CommentTag(): CommentTag

Returns

CommentTag

Properties

block

readonly block: true = true

Defined in

src/builtin/tags/comment.ts:6


end

readonly end: string = "endcomment"

Defined in

src/builtin/tags/comment.ts:8


name

readonly name: string = "comment"

Defined in

src/builtin/tags/comment.ts:7


nodeClass

protected nodeClass: typeof CommentNode = CommentNode

Defined in

src/builtin/tags/comment.ts:9

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/comment.ts:11