-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the possibility of unpacking function arguments (#26)
* First implementation of unpackable function arguments Can now unpack function arguments with a syntex similar to unpacking declarations/assignments: ``` fun unpackArgs((a, b), c) print(a, b, c) end var tuple = 1, 2 unpack-args(tuple, 3) ``` Will print ``` 1 2 3 ``` * Heap allocate synthetic names during compilation * Use `ext_vec_free` * Refactor function AST * Refactor parser * const correctness in compiler * Minor refactoring in `compiler.c` * Fix conflict with GNU `strchnul` * Minor refactoring * Initialization of `main` module now happens in `jsrInitRuntime`
- Loading branch information
Showing
9 changed files
with
317 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.