Skip to content

Commit cafa052

Browse files
committed
feat: pat_tuple
1 parent 841e2f5 commit cafa052

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

grammar.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,20 @@ module.exports = grammar({
154154
_pat: $ => choice(
155155
$.underscore,
156156
$.pat_ident,
157+
$.pat_tuple,
157158
),
158159

159160
pat_ident: $ => seq(
160161
optional('mut'),
161162
field('id', $.ident),
162163
),
163164

165+
pat_tuple: $ => seq(
166+
'(',
167+
listSepBy(',', $._pattern),
168+
')',
169+
),
170+
164171
pat_type: $ => seq(
165172
field('pat', $._pattern),
166173
':',

0 commit comments

Comments
 (0)