7 ms·
It does not directly target an IR like Cranelift/LLIR or even bytecode since the goal was to make this work in an alternative way (I used to design PL type syst
by elricmann 2y ago
It does not directly target an IR like Cranelift/LLIR or even bytecode since the goal was to make this work in an alternative way (I used to design PL type systems before so I can understand the rigor involved in building a complete language). Additionally, many _target-C/C++_ languages clutter the workspace with source & header files and other config metadata (albeit for plausible reasons). The main highlights are *deducible types* that match corresponding semantics in C++, *non-exhaustive pattern matching* and a *limited syntax grammar*. The _expression-based_ part is still incomplete but parseable.
There are many missing features (still v0.1 pre-release). So far, output source files are heavily underoptimized and error handling is basically messed up. My aim was to design a minimal PL that is similar to ML/Python and can target C++. It is also the first time I get to use a PEG parser implementation.