From e29c41a84b299c95a49dfa429f4161eb71cf6837 Mon Sep 17 00:00:00 2001 From: c Date: Sat, 24 Feb 2024 10:23:00 -0500 Subject: Definitions now work, with any number of arguments. --- src/parser.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') 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; -- cgit v1.2.3