Language Reference - Starwort/SPLIWACA GitHub Wiki

This reference manual describes the syntax and 'core semantics' of the language. It attempts to be exact and complete.

Line structure

Physical lines

A physical line is a sequence of characters terminated by an end-of-line sequence. In source files and strings, any of the standard platform line termination sequences can be used - the Unix form using ASCII LF (line feed), the Windows form using the ASCII sequence CR LF (return followed by line feed), or the old Macintosh form using the ASCII CR (carriage return) character. All of these forms can be used equally, regardless of platform. The end of input also serves as an implicit terminator for the final physical line.

Comments

A single-line comment starts with two forward slashes (//) that are not part of a string literal or line-consuming statement, and ends at the end of the physical line.

A multi-line comment starts with the marker /* that is not part of a string literal or line-consuming statement, and ends at the marker */ that is not part of a string literal or line-consuming statement.

Comments are ignored by the syntax.

Whitespace

Whitespace, outside of string literals, spacing between words, and line-consuming statements, is ignored. Whitespace is defined as any character in the regex group [ \t\f\u200B] and can be used interchangeably to separate words.

TODO: https://docs.python.org/3/reference/lexical_analysis.html#other-tokens