harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 3ed43ec2b1fe4a3e843ac728f5148c4d0b4639c9
parent d7cb279b5594ad03e1830f743e92a4f14c8a95d1
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sat, 17 Apr 2021 07:30:31 -0400

parse: remove control from expression-list

Diffstat:
Msrc/parse.c | 16++--------------
1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/parse.c b/src/parse.c @@ -2010,21 +2010,9 @@ parse_expression_list(struct lexer *lexer) bool more = true; while (more) { - struct token tok = {0}; - switch (lex(lexer, &tok)) { - case T_BREAK: - case T_CONTINUE: - case T_RETURN: - unlex(lexer, &tok); - cur->expr = parse_control_statement(lexer); - more = false; - break; - default: - unlex(lexer, &tok); - cur->expr = parse_expression(lexer); - break; - } + cur->expr = parse_expression(lexer); + struct token tok = {0}; want(lexer, T_SEMICOLON, &tok); if (more) {