Class: DefineParser
Variables are useful for choosing a value and referencing it later in a tag. It can be referenced using brackets as any other tag.
Aliases: assign, let, var
Example
{=(name):value}Example
{=(prefix):!}
The prefix here is `{prefix}`.Hierarchy
-
↳
DefineParser
Implements
Constructors
constructor
• new DefineParser()
Overrides
Properties
acceptedNames
• Protected acceptedNames: string[]
Inherited from
requiredParameter
• Protected requiredParameter: boolean
Inherited from
requiredPayload
• Protected requiredPayload: boolean
Inherited from
Methods
parse
▸ parse(ctx): string
Parses the given tag.
Parameters
| Name | Type | Description |
|---|---|---|
ctx | Context | The context of the tag. |
Returns
string
Implementation of
willAccept
▸ willAccept(ctx): boolean
Whether the parser can handle the given tag.
Parameters
| Name | Type | Description |
|---|---|---|
ctx | Context | The context of the tag. |
Returns
boolean