Tagscript

tagscript


Class: StrictVarsParser

Defined in: Parsers/StrictVars.ts:18

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

Defined in: Parsers/StrictVars.ts:24

Parses the given tag.

Parameters

ctx

Context

The context of the tag.

Returns

null | string

Implementation of

IParser.parse


willAccept()

willAccept(ctx): boolean

Defined in: Parsers/StrictVars.ts:19

Whether the parser can handle the given tag.

Parameters

ctx

Context

The context of the tag.

Returns

boolean

Implementation of

IParser.willAccept

On this page