Support function definition
ShivamSarodia opened this issue · comments
Shivam Sarodia commented
ShivyC today supports calling and declaring functions, but it should also support defining functions. In addition, the function declaration/calling mechanism is a bit rusty - it does not support structs as arguments or return values and may struggle with functions that take >6 arguments.
These additions require some additions on the frontend to support parsing function definitions. In addition, they require refactoring of the backend to allow multiple units of IL code that can each undergo register allocation individually.
Shivam Sarodia commented
Done in #63!