TagScript
classes
Strictvarsparser

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

Parameters

ctx: Context

Returns

null | string

Implementation of

IParser.parse

Source

lib/Parsers/StrictVars.ts:23


willAccept()

willAccept(ctx): boolean

Parameters

ctx: Context

Returns

boolean

Implementation of

IParser.willAccept

Source

lib/Parsers/StrictVars.ts:19