Language reference
This document describes the language implemented by the compiler in
compiler/, which is itself written in Cuarzo. It is not a roadmap.
Run a program with cuarzo run file.cz (or just cuarzo file.cz). Other
commands are cuarzo build for a native program, cuarzo c for C only, and
cuarzo check to report errors without building; cuarzo help lists them
with their options, such as -D NAME=value for
build constants and --platform
to check code for another platform. The standard library is described
on its own.
Contents
- Source files
- Types and literals
- Arrays
- Maps
- Tuples
- String operations
- Bytes
- Enums
- Structs
- Methods
- Interfaces
- Derived code
- Variables and assignment
- Constants
- Functions
- Modules
- Code for each platform
- Built-in printing
- Program input and output
- Conditionals
- Match
- Option and Result
- Cleaning up
- Async functions and tasks
- Calling C
- Loops
- Math
- Operators
- Scope and execution model
- Limits and memory
- Names
- Reserved but unsupported syntax