Skip to content

Commit 7963508

Browse files
authored
Add missing macro fragment specifiers (#69)
1 parent ab40806 commit 7963508

File tree

4 files changed

+4428
-4328
lines changed

4 files changed

+4428
-4328
lines changed

grammar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ module.exports = grammar({
167167
),
168168

169169
fragment_specifier: $ => choice(
170-
'ident', 'path', 'expr', 'ty', 'pat', 'stmt', 'block', 'item', 'meta', 'tt'
170+
'block', 'expr', 'ident', 'item', 'lifetime', 'literal', 'meta', 'pat',
171+
'path', 'stmt', 'tt', 'ty', 'vis'
171172
),
172173

173174
_tokens: $ => choice(

src/grammar.json

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -455,45 +455,57 @@
455455
"fragment_specifier": {
456456
"type": "CHOICE",
457457
"members": [
458+
{
459+
"type": "STRING",
460+
"value": "block"
461+
},
462+
{
463+
"type": "STRING",
464+
"value": "expr"
465+
},
458466
{
459467
"type": "STRING",
460468
"value": "ident"
461469
},
462470
{
463471
"type": "STRING",
464-
"value": "path"
472+
"value": "item"
465473
},
466474
{
467475
"type": "STRING",
468-
"value": "expr"
476+
"value": "lifetime"
469477
},
470478
{
471479
"type": "STRING",
472-
"value": "ty"
480+
"value": "literal"
481+
},
482+
{
483+
"type": "STRING",
484+
"value": "meta"
473485
},
474486
{
475487
"type": "STRING",
476488
"value": "pat"
477489
},
478490
{
479491
"type": "STRING",
480-
"value": "stmt"
492+
"value": "path"
481493
},
482494
{
483495
"type": "STRING",
484-
"value": "block"
496+
"value": "stmt"
485497
},
486498
{
487499
"type": "STRING",
488-
"value": "item"
500+
"value": "tt"
489501
},
490502
{
491503
"type": "STRING",
492-
"value": "meta"
504+
"value": "ty"
493505
},
494506
{
495507
"type": "STRING",
496-
"value": "tt"
508+
"value": "vis"
497509
}
498510
]
499511
},
@@ -743,7 +755,7 @@
743755
},
744756
{
745757
"type": "PATTERN",
746-
"value": "[\\/_\\-=->,;:::!=?.@*=\\/='&=#%=^=+<>|~]+"
758+
"value": "[/_\\-=->,;:::!=?.@*=/='&=#%=^=+<>|~]+"
747759
},
748760
{
749761
"type": "STRING",

src/node-types.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4766,10 +4766,18 @@
47664766
"type": "let",
47674767
"named": false
47684768
},
4769+
{
4770+
"type": "lifetime",
4771+
"named": false
4772+
},
47694773
{
47704774
"type": "line_comment",
47714775
"named": true
47724776
},
4777+
{
4778+
"type": "literal",
4779+
"named": false
4780+
},
47734781
{
47744782
"type": "loop",
47754783
"named": false
@@ -4890,6 +4898,10 @@
48904898
"type": "use",
48914899
"named": false
48924900
},
4901+
{
4902+
"type": "vis",
4903+
"named": false
4904+
},
48934905
{
48944906
"type": "where",
48954907
"named": false

0 commit comments

Comments
 (0)