claw-lang
claw-lang copied to clipboard
The compiler for the Claw language
Resolves #28. I'm new to both Claw and Rust build scripts, so happy for any comments, suggestions, or to throw this all out.
- [x] Parse the string type - [x] Encode the string type - [x] String as params - [x] Returning string - [x] String literals - [x] String concatenation (`+`)...
Add basic benchmarking for compilation. Ideally breaking it down by phase so we can see where time is being lost.
After generating the core module, but before wrapping it in the component, use [`wasm-opt`](https://crates.io/crates/wasm-opt) to optimize it.
The bump allocator used by Claw is in a separate `allocator.wat` file which is currently read by a `wat` parser each time a user compiles a Claw program. This can...
Add tests for things like - [ ] Invalid parses (e.g. EOFs) - [ ] Invalid name resolves (e.g. uses of unbound names) - [ ] Invalid type resolves (e.g....
In the [`codegen`](https://github.com/esoterra/claw-lang/blob/master/src/codegen.rs#L241) module, lots of the binary operations are not yet mapped to instructions. This just requires mapping every combination of `ValType` and `BinaryOp` to the correct `Instruction`. -...
- [ ] Parse the list type - [ ] Encode the list type - [ ] List literals - [ ] Lists as params - [ ] Returning lists...