Skip to content

Commit

Permalink
Merge pull request #142 from wolfmanstout/fix_mixed_arguments
Browse files Browse the repository at this point in the history
Fixed parsing of mixed value and lambda arguments.
  • Loading branch information
fwcd authored Aug 31, 2024
2 parents 68211f5 + 0f3f0f6 commit 7276b93
Show file tree
Hide file tree
Showing 5 changed files with 11,872 additions and 11,299 deletions.
3 changes: 2 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const PREC = {
SIMPLE_USER_TYPE: 2,
ASSIGNMENT: 1,
BLOCK: 1,
ARGUMENTS: 1,
LAMBDA_LITERAL: 0,
RETURN_OR_THROW: 0,
COMMENT: 0
Expand Down Expand Up @@ -700,7 +701,7 @@ module.exports = grammar({
// this introduces ambiguities with 'less than' for comparisons
optional($.type_arguments),
choice(
seq(optional($.value_arguments), $.annotated_lambda),
prec(PREC.ARGUMENTS, seq(optional($.value_arguments), $.annotated_lambda)),
$.value_arguments
)
)),
Expand Down
Loading

0 comments on commit 7276b93

Please sign in to comment.