| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
We now also test for local variables in functions, and add a simple
test to see if imports work properly.
|
|
|
We now support function calls! We don't have support for forward
declaring functions right now though, so no mutual recursion is
possible.
The arguments are passed via the stack instead of through registers
(unlike the x86_64 calling convention, I think). We'll probably need
some sort of primitives built into the language for syscalls
eventually because of this.
Return types are also not checked, and right now it's possible to have
a function that doesn't return anything even when the caller expects it
to, error checking and reporting definitely needs to be improved.
|