Skip to main content

Class: CaseNode

Implements

Constructors

new CaseNode()

new CaseNode(token, whens, default_?): CaseNode

Parameters

token: Token

The token that started this node. Used to add line and column numbers to error messages.

whens: ConditionalAlternative[]

default_?: BlockNode

Returns

CaseNode

Defined in

src/builtin/tags/case.ts:149

Properties

default_?

readonly optional default_: BlockNode

Defined in

src/builtin/tags/case.ts:152


forceOutput

forceOutput: boolean = false

Indicates that nodes that do automatic whitespace suppression should output this node regardless of its contents.

Implementation of

Node.forceOutput

Defined in

src/builtin/tags/case.ts:148


token

readonly token: Token

The token that started this node. Used to add line and column numbers to error messages.

Implementation of

Node.token

Defined in

src/builtin/tags/case.ts:150


whens

readonly whens: ConditionalAlternative[]

Defined in

src/builtin/tags/case.ts:151

Methods

children()

children(): ChildNode[]

Return an array of child nodes.

Returns

ChildNode[]

Implementation of

Node.children

Defined in

src/builtin/tags/case.ts:202


render()

render(context, out): Promise<void>

Render this node to the given output stream.

Parameters

context: RenderContext

The active render context.

out: RenderStream

The stream to output to.

Returns

Promise<void>

Implementation of

Node.render

Defined in

src/builtin/tags/case.ts:157


renderSync()

renderSync(context, out): void

A synchronous version of render.

Parameters

context: RenderContext

out: RenderStream

Returns

void

See

render

Implementation of

Node.renderSync

Defined in

src/builtin/tags/case.ts:183