{ Curly Brace }

Initiates or terminates a code block

Description

Curly braces are used to denote the start and end of a code block. Like with the single quotation marks ('), any code inside a curly brace is not parsed. Also unlike any other quotation tokens, the curly brace is included as part of the parsed string.

» out {example}
{example}

Also like the brace quote ((, )), the curly brace character is only recognized as a curly brace token if it is the start of a parameter.

Curly braces are also used for other fields besides code blocks. For example inlining JSON.

Detail

Multiline Blocks

Curly braces can work over multiple lines

» out {foo
» bar}
{foo
bar}

Code Golfing

Curly braces can be used to terminate the parsing of the command name and/or parameters too:

if{true}{out Yipee}

Nesting

Curly braces can be nested:

» out {{foo} bar}
{{foo} bar}

ANSI Constants

Some builtins (like out) also support infixing using the curly brace. eg

out "{GREEN}PASSED{RESET}"

This is a separate layer of parsing and happens at the parameter level for specific builtins which opt to support ANSI constants. See the ANSI Constant user guide (link below) for more information on supporting builtins and which constants are available.

See Also


This document was generated from gen/parser/codeblock_doc.yaml.

This site's content is rebuilt automatically from murex's source code after each merge to the master branch. Downloadable murex binaries are also built with the website.

Last built on Thu Aug 15 14:38:34 UTC 2024 against commit 50ed9d650ed9d6df391240d3c2c02e623636e508dfcdad1.

Current version is 6.2.4000 which has been verified against tests cases.