aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorc2023-11-26 18:03:55 -0500
committerc2023-11-26 18:03:55 -0500
commit4719af8e829493d4fee2782ce8870b0cc902638f (patch)
tree2f77b4132ec9c5f5a93756c3f74d354c1917f606 /src/include
parentb66334d81324a76a76da6578c5b095f3f02696e5 (diff)
Prepare for definition parsing.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/parser.h6
-rw-r--r--src/include/tree.h6
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;