Skip to content

Commit 467fd2c

Browse files
committed
Alias delim_token_tree to token_tree
1 parent ecbce1e commit 467fd2c

File tree

5 files changed

+60533
-60653
lines changed

5 files changed

+60533
-60653
lines changed

corpus/declarations.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ foo(#[bar(some tokens are special in other contexts: $/';()*()+.)] x);
10481048
arguments: (arguments
10491049
(attribute_item (attr_item
10501050
(identifier)
1051-
arguments: (delim_token_tree (identifier) (identifier))))
1051+
arguments: (token_tree (identifier) (identifier))))
10521052
(identifier)
10531053
(identifier))))
10541054
(expression_statement
@@ -1057,16 +1057,16 @@ foo(#[bar(some tokens are special in other contexts: $/';()*()+.)] x);
10571057
arguments: (arguments
10581058
(attribute_item (attr_item
10591059
(identifier)
1060-
arguments: (delim_token_tree
1060+
arguments: (token_tree
10611061
(identifier)
10621062
(identifier)
10631063
(identifier)
10641064
(identifier)
10651065
(identifier)
10661066
(identifier)
10671067
(identifier)
1068-
(delim_token_tree)
1069-
(delim_token_tree))))
1068+
(token_tree)
1069+
(token_tree))))
10701070
(identifier)))))
10711071

10721072
================================================================================
@@ -1102,15 +1102,15 @@ pub enum Error {
11021102
(enum_variant_list
11031103
(attribute_item (attr_item
11041104
(identifier)
1105-
(delim_token_tree
1105+
(token_tree
11061106
(string_literal)
11071107
(identifier)
1108-
(delim_token_tree (integer_literal)))))
1108+
(token_tree (integer_literal)))))
11091109
(enum_variant (identifier)
11101110
(ordered_field_declaration_list (type_identifier)))
11111111
(attribute_item (attr_item
11121112
(identifier)
1113-
(delim_token_tree
1113+
(token_tree
11141114
(string_literal)
11151115
(identifier)
11161116
(identifier)

grammar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ module.exports = grammar({
279279
$._path,
280280
optional(choice(
281281
seq('=', field('value', $._expression)),
282-
field('arguments', $.delim_token_tree)
282+
field('arguments', alias($.delim_token_tree, $.token_tree))
283283
))
284284
),
285285

src/grammar.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -987,8 +987,13 @@
987987
"type": "FIELD",
988988
"name": "arguments",
989989
"content": {
990-
"type": "SYMBOL",
991-
"name": "delim_token_tree"
990+
"type": "ALIAS",
991+
"content": {
992+
"type": "SYMBOL",
993+
"name": "delim_token_tree"
994+
},
995+
"named": true,
996+
"value": "token_tree"
992997
}
993998
}
994999
]

src/node-types.json

+1-44
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@
648648
"required": false,
649649
"types": [
650650
{
651-
"type": "delim_token_tree",
651+
"type": "token_tree",
652652
"named": true
653653
}
654654
]
@@ -1401,49 +1401,6 @@
14011401
]
14021402
}
14031403
},
1404-
{
1405-
"type": "delim_token_tree",
1406-
"named": true,
1407-
"fields": {},
1408-
"children": {
1409-
"multiple": true,
1410-
"required": false,
1411-
"types": [
1412-
{
1413-
"type": "_literal",
1414-
"named": true
1415-
},
1416-
{
1417-
"type": "crate",
1418-
"named": true
1419-
},
1420-
{
1421-
"type": "identifier",
1422-
"named": true
1423-
},
1424-
{
1425-
"type": "mutable_specifier",
1426-
"named": true
1427-
},
1428-
{
1429-
"type": "primitive_type",
1430-
"named": true
1431-
},
1432-
{
1433-
"type": "self",
1434-
"named": true
1435-
},
1436-
{
1437-
"type": "super",
1438-
"named": true
1439-
},
1440-
{
1441-
"type": "token_tree",
1442-
"named": true
1443-
}
1444-
]
1445-
}
1446-
},
14471404
{
14481405
"type": "dynamic_type",
14491406
"named": true,

0 commit comments

Comments
 (0)