3. Lines, indentation and comments
Write one instruction on each line. A block opens with a word such as if or function and closes with
end. Indentation makes the block readable; it does not replace end. There are no C-style braces around a block and no semicolons at the ends of instructions.
language 1.0
# This comment takes up a whole line.
function run()
let points = 5 // This comment follows an instruction.
let address = "https://example.test/#door"
return points
endBoth # and // begin a comment outside a quoted string. The address above keeps its slashes and hash because they are inside quotes. There is no separate multiline comment delimiter: put a comment marker on each line.
Keep a function call, array or dictionary on one physical line. The parser is line-oriented; spreading its arguments over several lines is not a supported continuation style. A long action is easier to read if you build its options dictionary a field at a time.
function run()
let options = {}
options["text"] = "The workshop is quiet."
options["duration"] = 2
show_message(options)
endNames are case-insensitive when the language looks up variables, functions and records. Text inside quotes is preserved. Use a consistent spelling anyway: door_open is much easier to follow than three versions of the same name.
