harec

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

commit dd40b619a1945534f4dc7a06d1c470031301a085
parent 63a3174a7099949ce62e28a15b0774930a6ef77b
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Wed, 20 Jan 2021 14:30:52 -0500

parse_scope_expression: fix casts and binarithms

Fixes `fn test() uint = { 1: uint; };` and `fn test() int = { 1 + 2; };`

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

diff --git a/src/parse.c b/src/parse.c @@ -1859,9 +1859,9 @@ parse_scope_expression(struct lexer *lexer) return parse_deferred_expression(lexer); default: unlex(lexer, &tok); - value = parse_unary_expression(lexer); + value = parse_cast_expression(lexer, NULL); if (!indirect && value->type != EXPR_ACCESS) { - return value; + return parse_bin_expression(lexer, value, 0); } // Is possible object-selector, try for assignment break;