Stop Parser
The Stop Parser halts further tag processing when the provided condition evaluates to true.
Usage
{stop(condition):optional message}
Examples
Notes
Stop & Break Parsers
This page documents two related control parsers used to influence tag processing flow: stop (halt processing entirely) and break (replace output of the current tag but continue parsing subsequent tags).
Stop Parser
The Stop Parser halts all TagScript parsing when the provided condition evaluates to true. If a payload message is provided, that message is returned immediately and no further tags are processed.
Aliases
stop,halt
Usage
{stop(condition):optional message}
Examples
- Input:
{stop({args}!=10):You didn't provide valid input.} - If
{args}is not10, the parser returnsYou didn't provide valid input.and stops all further processing.
Notes
- When the condition is false, processing continues and the parser does not emit the payload.
- Use this tag to short-circuit placeholder processing when validation fails.
Break Parser
The Break Parser forces the output of the current tag to be only this parser's payload when the passed expression evaluates to true. If no payload is provided, the tag output will be empty. Unlike stop, break does not stop overall TagScript parsing — subsequent tags still execute.
Usage
{break(expression):message}
Examples
- Input:
{break({args}==):You did not provide any input.} - If
{args}is empty, the parser outputsYou did not provide any input.for this tag, but other tags after it will continue to be processed.
Notes
- Use
breakwhen you want to override the current tag's output conditionally but allow later tags to run. - Use
stopwhen you need to entirely halt parsing and return a message immediately.