diff options
author | c | 2023-11-26 18:03:55 -0500 |
---|---|---|
committer | c | 2023-11-26 18:03:55 -0500 |
commit | 4719af8e829493d4fee2782ce8870b0cc902638f (patch) | |
tree | 2f77b4132ec9c5f5a93756c3f74d354c1917f606 /src/include | |
parent | b66334d81324a76a76da6578c5b095f3f02696e5 (diff) |
Prepare for definition parsing.
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 acf6438..59cd0ae 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 definition's arguments. */ +tree_t* parser_parse_darg(parser_t* parser); + +/* Return the tree for a definition. */ +tree_t* parser_parse_def(parser_t* parser); + /* Return the tree for a call's arguments. */ tree_t* parser_parse_carg(parser_t* parser); diff --git a/src/include/tree.h b/src/include/tree.h index 8954ef8..1976773 100644 --- a/src/include/tree.h +++ b/src/include/tree.h @@ -51,18 +51,18 @@ typedef struct TREE { /* Tags. */ struct TREE_DATA_TAG { char* val; - struct TREE* nxt; /* TAG* */ + struct TREE* nxt; /* TAG */ } tag; /* Definition arguments. */ struct TREE_DATA_DARG { - struct TREE* tag; /* TAG* */ + struct TREE* val; /* DEF */ struct TREE* nxt; /* DARG */ } darg; /* Call arguments. */ struct TREE_DATA_CARG { - struct TREE* val; + struct TREE* val; /* EXPR */ struct TREE* nxt; /* CARG */ } carg; |