Line continuation
Jump to navigation
Jump to search
MiniScript statements are separated by line breaks rather than explicit punctuation (such as the semicolon in C). It is nonetheless possible to break a long MiniScript statement into multiple lines, by placing the line break immediately after any of:
- an opening
(
,[
, or{
- a comma or colon:
,
or:
- any binary operator:
+
,-
,and
,or
, etc.
Example
x = {
"foo": "A commonly used variable name in example code",
"bar":
"A second commonly used example variable name" }
Note that the final }
in this example cannot be put on the next line, since it does not follow one of the special line-continuing tokens.