Error reference › Parser diagnostics
PARSE002
unbalanced delimiter
errorWhat it means
The parser tracks every open `(`, `[`, `{` with its exact position. When the expected closer does not appear, the message names the position of the matching opening delimiter so multi-line mistakes are easy to find.
Trigger condition
A closing delimiter (`)`, `]`, `}`) is missing — for example a function call or grouped expression is left open.
Minimal failing example
let total = add(1, 2
let next = 4Verified fix
let total = add(1, 2)
let next = 4Message shape: `Expected ')' to match '(' opened at line L, column C`.
What the interpreter prints
error[PARSE002]: unbalanced delimiter
--> app.mz:1:16
1 | let total = add(1, 2
| ^
|
reason: (the exact problem, with positions)
help: (a suggested fix appears here)
docs: https://crossberry-in.github.io/mozhi-doc/errors/PARSE002Run
mozhi --json run app.mz to get the same information as
machine-readable JSON (schema mozhi.diagnostics.v1), or --verbose to
also show grouped related diagnostics. See the CLI reference.Suggested fix
Add the missing closer. For long expressions, format one argument per line so unbalanced delimiters are visible.
Related syntax
Function calls, arrays, maps
Related diagnostics
Reference links
Limitations
Mismatched pairs (e.g. `(]`) are tolerated by the tracker: it pops the innermost matching opener, so the reported opener is the best local match.