git://git.cassowary.me
/
sarabande.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
599b645
)
catch weird syntax errors with non-expr after binary op
author
cassowarii
<cassowary@cassowary.me>
Sun, 12 Jul 2026 20:46:53 +0000
(13:46 -0700)
committer
cassowarii
<cassowary@cassowary.me>
Sun, 12 Jul 2026 20:46:53 +0000
(13:46 -0700)
src/parse/parser.c
patch
|
blob
|
history
diff --git
a/src/parse/parser.c
b/src/parse/parser.c
index
5774da3
..
639fec7
100644
(file)
--- a/
src/parse/parser.c
+++ b/
src/parse/parser.c
@@
-637,6
+637,7
@@
static sbAst parse_expr(hParser pr, u8 min_precedence) {
if (rhs == NO_NODE) return syntax_error(pr);
} else {
rhs = parse_expr(pr, infix->right_precedence);
+ if (rhs == NO_NODE) return syntax_error(pr);
}
if (ast_type == AST_NODE_OP) {