RatMinimal web framework

Parser errors

The parser flags common dialect mistakes with a one-line did-you-mean hint, so a misleading unexpected token message points you straight at the documented fix. Each error carries a byte-precise column inside the failing expression and a hint suffix in the form - hint: ….

Multi-line object literals

Collapse to one line, or use the indent-nested form

Multi-line braced object literals are not supported, because the dialect line parser handles one logical line per declaration. Either keep the object on one line or use the indent-nested name: form with deeper-indented children, which the pre-pass collapses for you.

# bad - parser fails with: expected object key, got "end of input"
> server
person: { first: 'Grace', last: 'Hopper' }

# good - one line
> server
person: { first: 'Grace', last: 'Hopper' }

# also good - indent-nested
> server
person: { first: 'Grace', last: 'Hopper' }

Unclosed bracket in a string

Escape literal brackets so the interpolation splitter ignores them

Inside a string literal, [expr] is evaluated and substituted. A bare [ without a matching ] trips the interpolation splitter. Escape with \\[ when you need a literal bracket, for example a code snippet that includes [name] in its output.

> server snippet: 'see [name' > server snippet: 'see [name' 

Multi-line tag attributes

Keep every attribute on the same line as its opening tag

Tag attributes have to fit on one line. The dialect does not parse attr[ on one line with the value on the next; the tag folder produces a single composite line and the parser fails to balance the bracket. Either inline the value or route it through a server field and interpolate with [name].

<a href[ '/posts/getting-started'> Read post Read post > server post_href: '/posts/getting-started' > page Read post 

Markdown emphasis in expression position

Escape the asterisk, or route the maths through a derived field