Skip to content

jqcorreia/lang

Repository files navigation

Lang

Procedural language with basics done right. Straightforward, correct and if possible with some syntatic sugar on top. Aims to be explicit but to not sacrifice all the creature comforts of a modern language.

Already done:

  • Lexing
  • Parsing / AST construction (straightforward Pratt parser)
  • Basic Checker (semantic and basic types)
  • Integers and Boolean support
  • Comments (surprisingly hard to implement well actually)
  • User functions
  • Recursion
  • Unconditional For loop with break and continue
  • Single file, single module
  • Hardcoded printf import from libc
  • LLVM codegen (planning to abstract the backend, but one fight at a time)

Potentially this README can look a lot different in a couple of months if this becomes a serious project.

TODO

  • Do not need forward declaration with symbol table pass and LLVM function declaration
  • Basic type system
  • User defined types (i.e structs)
  • Bound checked arrays
  • Bound checked strings

Try it

odin build .
./lang run tests/basic.z 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages