Skip to content

Input format

Each source file is interpreted as a sequence of Unicode characters encoded in UTF-8.

Info

The order in which files are passed to the compiler is not important. However, passing the same file multiple times is treated as an error.

Special-character behaviour

Control characters are permitted in source code, except for Carriage return (U+000D) and Line feed (U+000A). The Null (U+0000) character is forbidden by the standard. The compiler behaviour is undefined.

Line endings

The language treats invisible line-ending characters as trivia, except for multiline string literals.

Allowed line-ending character sequences:

  • U+000A - line feed.
  • U+000D + U+000A - carriage return followed by line feed.

The compiler may not handle other line-ending sequences correctly.

Tab width

By default, the compiler treats the Tab (U+0009) character as 4 characters wide.

You can override this by setting the tab_width or indent_size property in your .editorconfig file.