Skip to content

Commit 7276b93

Browse files
authored
Merge pull request #142 from wolfmanstout/fix_mixed_arguments
Fixed parsing of mixed value and lambda arguments.
2 parents 68211f5 + 0f3f0f6 commit 7276b93

File tree

5 files changed

+11872
-11299
lines changed

5 files changed

+11872
-11299
lines changed

grammar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const PREC = {
4444
SIMPLE_USER_TYPE: 2,
4545
ASSIGNMENT: 1,
4646
BLOCK: 1,
47+
ARGUMENTS: 1,
4748
LAMBDA_LITERAL: 0,
4849
RETURN_OR_THROW: 0,
4950
COMMENT: 0
@@ -700,7 +701,7 @@ module.exports = grammar({
700701
// this introduces ambiguities with 'less than' for comparisons
701702
optional($.type_arguments),
702703
choice(
703-
seq(optional($.value_arguments), $.annotated_lambda),
704+
prec(PREC.ARGUMENTS, seq(optional($.value_arguments), $.annotated_lambda)),
704705
$.value_arguments
705706
)
706707
)),

0 commit comments

Comments
 (0)