A toy language I'm building in Zig.
You can find examples in the docs directory, and formal grammar here.
Note: variables are always immutable.
More features are being actively worked on.
zig buildzig build run -- test.kw program
zig cc program.o -o program
./programThere must be a test.kw file in the root of the project with example Kiwi code.
Note: the above steps can be automated by running ./run.sh.
- Basic variable declarations (with type annotations)
- Arithmetic expressions (
+,-,*,/) - Return statements
- Variable references
- Function declarations and calls
- Function parameters and return types
- Function calls
- Conditional statements
- Comparison operators
- Logical operators
- Booleans
- Basic error messages
- Type checking and validation
- Basic IO
- First Class Functions
- Arrays/Hashmaps
- Pattern matching
- Tuples
- Import system/stdlib
- More advanced compiler error messages
- Comments
- Lambda Expressions
- Strings
- Error handling
- Main function does not check what its return type is