ShivamSarodia / ShivyC

C compiler created in Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support function definition

ShivamSarodia opened this issue · comments

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.

Done in #63!