Skip to content

patchydev/kiwi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

66 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

About

πŸ₯πŸ¦

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published