Skip to content

Commit

Permalink
Merge pull request #86 from crystal-lang-tools/nobody/double-splat-type
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodywasishere authored Jan 6, 2025
2 parents 34b909b + c5fb916 commit 6172504
Show file tree
Hide file tree
Showing 6 changed files with 912,430 additions and 904,381 deletions.
5 changes: 5 additions & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1695,6 +1695,7 @@ module.exports = grammar({
// but this is not:
// alias Foo = {A, B -> C}
_splattable_type: $ => choice(
$.double_splat_type,
$.splat_type,
$._type,
),
Expand Down Expand Up @@ -1779,6 +1780,10 @@ module.exports = grammar({
'*', $._type,
)),

double_splat_type: $ => prec('splat_type', seq(
alias($._unary_double_star, '**'), $._type,
)),

tuple_type: $ => seq(
alias($._start_of_tuple_type, '{'),
$._splattable_type,
Expand Down
26 changes: 26 additions & 0 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6172504

Please sign in to comment.