added parsing ad compilation of function declarations

This commit is contained in:
cozis
2021-11-02 10:54:49 +00:00
parent 51f782362e
commit 051966a3f3
10 changed files with 362 additions and 22 deletions
+15
View File
@@ -9,6 +9,8 @@ typedef enum {
NODE_IFELSE,
NODE_COMP,
NODE_RETURN,
NODE_FUNC,
NODE_ARG,
} NodeKind;
typedef enum {
@@ -93,4 +95,17 @@ typedef struct {
Node base;
Node *val;
} ReturnNode;
typedef struct {
Node base;
char *name;
Node *argv;
int argc;
Node *body;
} FunctionNode;
typedef struct {
Node base;
char *name;
} ArgumentNode;
#endif