Interface: IParser
Parsers are used to parse a tag and return a value based on the tag.
Implemented by
BreakParser
DefineParser
FiftyFiftyParser
IfStatementParser
IncludesParser
IntersectionStatementParser
JSONVarParser
LooseVarsParser
OrdinalFormatParser
RandomParser
RangeParser
ReplaceParser
SliceParser
StopParser
StrictVarsParser
StringFormatParser
UnionStatementParser
UrlDecodeParser
UrlEncodeParser
Properties
parse
• parse: (ctx
: Context
) => Awaitable
<null
| string
>
Parses the given tag.
Type declaration
▸ (ctx
): Awaitable
<null
| string
>
Parameters
Name | Type | Description |
---|---|---|
ctx | Context | The context of the tag. |
Returns
Awaitable
<null
| string
>
Defined in
lib/interfaces/index.ts:25
willAccept
• willAccept: (ctx
: Context
) => Awaitable
<boolean
>
Whether the parser can handle the given tag.
Type declaration
▸ (ctx
): Awaitable
<boolean
>
Parameters
Name | Type | Description |
---|---|---|
ctx | Context | The context of the tag. |
Returns
Awaitable
<boolean
>
Defined in
lib/interfaces/index.ts:31