Rat docs

Parse-error overlay

A static recreation of what the dev server shows when a .rat file fails to parse. Three of the hint catalog's documented shapes, with the source that triggers them on the left and the rendered overlay on the right. The live overlay is served by internal/server/error_page.go ; this page renders the same markup so authors can preview the look without breaking a file.

Each example pairs the offending source on the left with the diagnostic the dev server surfaces on the right. The hint block under the red error line is wired up by the hint catalog in internal/parser/diagnostic.go .

Markdown emphasis leaks into an expression

A bare * in body prose gets rewritten as <em> by the renderer's markdown pass. When the rewritten output lands in expression position the parser sees an inline HTML tag where it wanted an operand.

source
> page
<h1> playground
n << a + *x*
parse errorpages/sample.rat:3:10
page: assign rhs: unexpected token "<"
hintlooks like a markdown-rewritten emphasis leaked into an expression — escape the asterisks with a backslash in body prose, or use × for a literal multiply sign.
   1 │ > page   2 │ <h1> playground>  3 │ n << a + <em>x</em>            ^

Unclosed bracket in a string

[expr] inside a string literal interpolates the expression — a bare [ without a matching ] trips the splitter. Common when an attribute value or model field carries a literal [ for documentation purposes.

source
> page 

playground snippet << 'see [name'
parse error pages/sample.rat:3
page: assign rhs: unclosed [ in string
hint string literals interpolate bracket expressions — escape with a backslash to embed a literal opening bracket, or rephrase the value so the brackets balance.
   1 │ > page    2 │ <h1> playground >  3 │ snippet << 'see [name' 

Read the catalog and add new signatures via the dev-workflow errors page.