Skip to content

Commit c23320d

Browse files
committed
Fix parser to allow binary operators for binding syntax
Previously, the precedence of `as` binding was higher than the binary operators. This results in unexpected behaviors, `1 + 2 as $x | -$x` was `-1` instead of `-3`. The commit 92daac9 (PR jqlang#3053) changed the behavior to emit syntax error on this case. Now, this commit allows binary operators with `as` binding. This fixes jqlang#2446, and fixes jqlang#3284.
1 parent 4e3088f commit c23320d

File tree

3 files changed

+522
-524
lines changed

3 files changed

+522
-524
lines changed

0 commit comments

Comments
 (0)