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

Blocks and indentation

Each block is introduced by a header line, then one or more lines indented two spaces deeper.

spec MySpec version 1

state
  count int is 0

on Tick
  rule bump
    when true
    set count to count plus 1

Validator codes

CodeMeaning
P001Tab character used for indentation
P002Odd number of spaces (use multiples of two)
P003Dedent past the outermost block
P004Indentation does not match any enclosing block
P020Parser expected an indented block

Tabs are never allowed. Mixed dedent levels must match a previous indent level on the stack.