Skip to content

Commit 6334d6a

Browse files
authored
Merge pull request #216 from aibaars/fix-parse-error
Fix parse error in 'foo! if condition'
2 parents adec59e + 469e45a commit 6334d6a

File tree

4 files changed

+281228
-281218
lines changed

4 files changed

+281228
-281218
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ module.exports = grammar({
975975
rest_assignment: $ => prec(-1, seq('*', optional($._lhs))),
976976

977977
_function_identifier: $ => choice(alias($.identifier_suffix, $.identifier), alias($.constant_suffix, $.constant)),
978-
_function_identifier_call: $ => prec.right(field('method', $._function_identifier)),
978+
_function_identifier_call: $ => prec.left(field('method', $._function_identifier)),
979979
_lhs: $ => prec.left(choice(
980980
$._variable,
981981
$.true,

src/grammar.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6383,7 +6383,7 @@
63836383
]
63846384
},
63856385
"_function_identifier_call": {
6386-
"type": "PREC_RIGHT",
6386+
"type": "PREC_LEFT",
63876387
"value": 0,
63886388
"content": {
63896389
"type": "FIELD",

0 commit comments

Comments
 (0)