Tagscript

Class: StrictVarsParser

The strict variable tag represents the transformer for any seeded or defined variables. This variable implementation is considered strict since it checks whether the variable is valid during willAccept and is only parsed if the declaration refers to a valid variable.

Example

# Note:- this example assumes you are using define parser
{=(var):This is my variable.}
{var}
# This is my variable.

Implements

Constructors

new StrictVarsParser()

new StrictVarsParser(): StrictVarsParser

Returns

StrictVarsParser

Methods

parse()

parse(ctx): null | string

Parses the given tag.

Parameters

ctx: Context

The context of the tag.

Returns

null | string

Implementation of

IParser.parse

Defined in

Parsers/StrictVars.ts:23


willAccept()

willAccept(ctx): boolean

Whether the parser can handle the given tag.

Parameters

ctx: Context

The context of the tag.

Returns

boolean

Implementation of

IParser.willAccept

Defined in

Parsers/StrictVars.ts:19

On this page