From 135e23094c42b33acdd05dd522bbe0fd691b9eee Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 26 Mar 2024 14:02:48 -0400 Subject: Improve codegen for table/array iteration by inlining the iteration macros --- parse.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'parse.c') diff --git a/parse.c b/parse.c index a8ef5cd3..5355f91e 100644 --- a/parse.c +++ b/parse.c @@ -1112,8 +1112,7 @@ PARSER(parse_pass) { PARSER(parse_skip) { const char *start = pos; if (!match_word(&pos, "skip")) return NULL; - spaces(&pos); - const char* target; + const char *target; if (match_word(&pos, "for")) target = "for"; else if (match_word(&pos, "while")) target = "while"; else target = get_id(&pos); @@ -1124,8 +1123,7 @@ PARSER(parse_skip) { PARSER(parse_stop) { const char *start = pos; if (!match_word(&pos, "stop")) return NULL; - spaces(&pos); - const char* target; + const char *target; if (match_word(&pos, "for")) target = "for"; else if (match_word(&pos, "while")) target = "while"; else target = get_id(&pos); @@ -1136,7 +1134,6 @@ PARSER(parse_stop) { PARSER(parse_return) { const char *start = pos; if (!match_word(&pos, "return")) return NULL; - spaces(&pos); ast_t *value = optional(ctx, &pos, parse_expr); ast_t *ret = NewAST(ctx->file, start, pos, Return, .value=value); return ret; -- cgit v1.2.3