diff options
author | c | 2023-11-25 10:37:37 -0500 |
---|---|---|
committer | c | 2023-11-25 10:37:37 -0500 |
commit | bf3767fa7f0f1687d930d0d137e76a0206545fd6 (patch) | |
tree | 30bc03851ecfa3618c19b4de4a895fc7fc284abd /src/include | |
parent | 930ca8d3b760b33123ba877514a49eca5af35a6a (diff) |
Functions with single arguments are possible.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/parser.h | 6 | ||||
-rw-r--r-- | src/include/tree.h | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/include/parser.h b/src/include/parser.h index a349992..acf6438 100644 --- a/src/include/parser.h +++ b/src/include/parser.h @@ -49,6 +49,12 @@ tree_t* parser_parse_expr(parser_t* parser); /* Return the tree for an expression. */ tree_t* parser_parse_block(parser_t* parser); +/* Return the tree for a call's arguments. */ +tree_t* parser_parse_carg(parser_t* parser); + +/* Return the tree for a call. */ +tree_t* parser_parse_call(parser_t* parser); + /* Parse. */ tree_t* parser_parse(parser_t* parser); diff --git a/src/include/tree.h b/src/include/tree.h index 3d3bcbd..8954ef8 100644 --- a/src/include/tree.h +++ b/src/include/tree.h @@ -12,7 +12,7 @@ typedef enum TREE_TYPE { TREE_TYPE_DARG, TREE_TYPE_CARG, TREE_TYPE_DEF, - TREE_TYPE_CAL, + TREE_TYPE_CALL, } tree_type_t; /* The Abstract Syntax Tree (AST) structure. */ @@ -74,10 +74,10 @@ typedef struct TREE { } def; /* Calls. */ - struct TREE_DATA_CAL { + struct TREE_DATA_CALL { char* target; struct TREE* arg; /* CARG */ - } cal; + } call; } data; } tree_t; |