aboutsummaryrefslogtreecommitdiff
path: root/src/utils.h
Commit message (Collapse)AuthorAgeFilesLines
* Allow `builtins.c` to inject constants into program, use for syscallsMustafa Quraish2022-02-051-0/+2
| | | | | | We can now directly expose the `syscallN()` APIs to the program and define the `open()`, `write()` etc syscalls in the stdlib. This simplifies the implementation a decent bunch :^)
* Type checking of expressions / functions!Mustafa Quraish2022-02-021-0/+3
| | | | | | | | | | | | | | | | | This is a bit of a chonky commit, but it adds in the basics of checking the types of expressions / function calls / return types. There's still a lot of work to be done, including: (1) Adding new core types, and casting between allowed types automatically (2) Picking the corrent output type based on input types (for instance float+int == float) (3) We need much better error reporting, the error messages are really vague and unhelpful as-is (4) We also need to work to ensure that a function with a return type actually returns (5) Possible re-factoring to make stuff less hacky when we have more types / structs / arrays / etc.
* Rename `cup` directory to `src`Mustafa Quraish2022-01-301-0/+12