Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error codes

Parser (P0xx)

CodeSummary
P001Tabs in indentation
P002Indent not a multiple of two spaces
P003Dedent beyond outermost block
P004Indent does not match a prior level
P010Unexpected = in an expression (use is or ==); or unexpected character
P013Braces, brackets, or parentheses (Romit script surface is brace-free)
P014Trailing comma in a parameter or argument list
P015Empty slot between commas (,,)
P020Expected indented block or statement
P021Expected a word
P027Call syntax used : after the name (fn/function and : are for definitions only)
P028Nested call not allowed except as the last argument on the line
P029{ in text without a matching } (use {{ for a literal brace)
P011Text not closed on its line (use """ … """ for several lines)

Type and rules (E1xx, E2xx)

CodeSummary
E005Script mixed with spec declarations
E006Empty script
E107say or print value not printable
E108Undefined script variable
E110give used outside a function body
E111Parameter shadows a variable in an outer scope
E112Duplicate parameter name in one function
E113Function can finish without give on some path
E114Wrong number of arguments at a call
E115Undefined function in a script
E116Unknown named argument at a call
E118fn / function definition missing an indented body
E119fn / function missing the function name
E199Test expectation failed at runtime
E210Type or field error (checker)
E402Rule never exercised by tests (coverage)
E120use "file.rmt" couldn’t be read, or names a spec
E901fail "…" that no try caught (the message is yours)

UI framework (U0xx)

CodeSummary
U001Unknown UI part (lists valid parts)
U002UI file must use use ui or valid use template
U003Page declaration missing or duplicate
U006Unknown theme token (lists valid tokens)
U007Custom template file invalid or unreadable
U008Cannot write build output

Apps (app / screen)

CodeSummary
U001Unknown element (with “did you mean”)
U003App structure: missing screen, bad screen or view line, block in the wrong place
U006Unknown theme setting
U101Unknown name: not a state value, computed value, loop item, or parameter
U102Bad expression or unexpected word on a line
U103Bad state or computed line (name is value)
U104Unknown event, or event in the wrong place (every and on change of go on screens or the app)
U105Modifier not indented under an element
U106Bad for each … in …
U107Modifier is missing its value
U108Bad time for every
U109Unknown or malformed action
U110Name can’t be used for state (modifier or reserved word)
U111Name or screen defined twice
U112Changing something that can’t change (computed values, loop items)
U113Unknown screen, or wrong number of values passed to it
U114Unknown action, or wrong number of values passed to it
U115Unknown view, or wrong number of values passed to it
U116Control is missing bind, options, or to
U117State value uses another one before it is defined
U118document problem: no document line, or it names something not in state

Warnings (W4xx)

CodeSummary
W410Suspicious but legal construct

Negative fixtures live under examples/negative/.