🥝🐦
Find a file
2025-12-11 00:52:57 -05:00
docs comparison operators 2025-07-09 03:37:43 +00:00
src Revert "feat: rewriting in Rust" 2025-12-11 00:52:57 -05:00
.gitignore Revert "feat: rewriting in Rust" 2025-12-11 00:52:57 -05:00
build.zig Revert "feat: rewriting in Rust" 2025-12-11 00:52:57 -05:00
LICENSE add license 2025-06-01 02:56:50 +00:00
README.md main function is now required 2025-06-11 02:11:35 +00:00
run.sh works now 2025-05-29 01:54:55 +00:00
shell.nix clean up nix shell, hopefully this doesn't break stuff 2025-06-11 02:33:42 +00:00

Kiwi Language

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.

Compilation:

zig build

Running:

zig build run -- test.kw program
zig cc program.o -o program
./program

There 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.

Implementation Status

Working

  • Basic variable declarations (with type annotations)
  • Arithmetic expressions (+, -, *, /)
  • Return statements
  • Variable references
  • Function declarations and calls
  • Function parameters and return types
  • Function calls

🔄 In Development

  • Conditional statements
  • Comparison operators
  • Logical operators
  • Booleans
  • Basic error messages

📋 Planned

  • 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

🐛 Known Issues

  • Main function does not check what its return type is