Skip to content

Patterns

Self-contained recipes for the engine's flow-control features. Where the Synthmas walkthrough follows one dataset end-to-end, this section is the inverse: one feature per page, with a small focused example that exercises it.

In this section

Where the syntax lives

All four patterns are part of the new parser (1.4 and later). The older single-rule || continues to work unchanged — see DSL Guide → Conditional Chaining. The block forms ({ ... }(:var) || { ... }(:var) and the ++ operator) and the If / Switch keywords are the new additions.

Every example below was lifted from a real test in the engine's test suite — file pointers are at the bottom of each page. If a test name is mentioned, the directory at tests/<name>/ in the repo contains the full Rabbit-in-a-Hat fixture.