aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorc2024-02-24 10:23:00 -0500
committerc2024-02-24 10:23:00 -0500
commite29c41a84b299c95a49dfa429f4161eb71cf6837 (patch)
tree4e38ce92a2a026c6b8bae8d1d28dfc1b739380ef /src
parent78621011a21847a3b769869d434b2ada50fdad51 (diff)
Definitions now work, with any number of arguments.
Diffstat (limited to 'src')
-rw-r--r--src/parser.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/parser.c b/src/parser.c
index b42d2f0..3dc26a1 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -94,14 +94,15 @@ tree_t* parser_parse_def(parser_t* parser) {
def->data.def.tag = parser_parse_tag(parser);
if (parser->token->type == TOKEN_TYPE_APPLY) {
- parser_nxt_token(parser);
+ parser_nxt_token(parser); /* Skip over apply. */
def->data.def.arg = parser_parse_darg(parser);
} else {
def->data.def.arg = NULL;
}
+ LOG_DBGF("%s <<<<<<<<<<<<,, HERE HER HERE", parser->token->val);
if (parser->token->type == TOKEN_TYPE_SET) {
- parser_nxt_token(parser);
+ parser_nxt_token(parser); /* Skip over set. */
def->data.def.val = parser_parse_expr(parser);
} else {
def->data.def.val = NULL;
@@ -133,10 +134,8 @@ tree_t* parser_parse_darg(parser_t* parser) {
darg->data.darg.tag = parser_parse_tag(parser);
- parser_nxt_token(parser);
-
if (parser->token->type == TOKEN_TYPE_LIST_DELIM) {
- parser_nxt_token(parser);
+ parser_nxt_token(parser); /* Skip over list delim. */
darg->data.darg.nxt = parser_parse_darg(parser);
} else {
darg->data.darg.nxt = NULL;