Skip to content

Commit

Permalink
Alias delim_token_tree to token_tree
Browse files Browse the repository at this point in the history
  • Loading branch information
ninevra committed Mar 8, 2022
1 parent ecbce1e commit 467fd2c
Show file tree
Hide file tree
Showing 5 changed files with 60,533 additions and 60,653 deletions.
14 changes: 7 additions & 7 deletions corpus/declarations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ foo(#[bar(some tokens are special in other contexts: $/';()*()+.)] x);
arguments: (arguments
(attribute_item (attr_item
(identifier)
arguments: (delim_token_tree (identifier) (identifier))))
arguments: (token_tree (identifier) (identifier))))
(identifier)
(identifier))))
(expression_statement
Expand All @@ -1057,16 +1057,16 @@ foo(#[bar(some tokens are special in other contexts: $/';()*()+.)] x);
arguments: (arguments
(attribute_item (attr_item
(identifier)
arguments: (delim_token_tree
arguments: (token_tree
(identifier)
(identifier)
(identifier)
(identifier)
(identifier)
(identifier)
(identifier)
(delim_token_tree)
(delim_token_tree))))
(token_tree)
(token_tree))))
(identifier)))))

================================================================================
Expand Down Expand Up @@ -1102,15 +1102,15 @@ pub enum Error {
(enum_variant_list
(attribute_item (attr_item
(identifier)
(delim_token_tree
(token_tree
(string_literal)
(identifier)
(delim_token_tree (integer_literal)))))
(token_tree (integer_literal)))))
(enum_variant (identifier)
(ordered_field_declaration_list (type_identifier)))
(attribute_item (attr_item
(identifier)
(delim_token_tree
(token_tree
(string_literal)
(identifier)
(identifier)
Expand Down
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ module.exports = grammar({
$._path,
optional(choice(
seq('=', field('value', $._expression)),
field('arguments', $.delim_token_tree)
field('arguments', alias($.delim_token_tree, $.token_tree))
))
),

Expand Down
9 changes: 7 additions & 2 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -987,8 +987,13 @@
"type": "FIELD",
"name": "arguments",
"content": {
"type": "SYMBOL",
"name": "delim_token_tree"
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "delim_token_tree"
},
"named": true,
"value": "token_tree"
}
}
]
Expand Down
45 changes: 1 addition & 44 deletions src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@
"required": false,
"types": [
{
"type": "delim_token_tree",
"type": "token_tree",
"named": true
}
]
Expand Down Expand Up @@ -1401,49 +1401,6 @@
]
}
},
{
"type": "delim_token_tree",
"named": true,
"fields": {},
"children": {
"multiple": true,
"required": false,
"types": [
{
"type": "_literal",
"named": true
},
{
"type": "crate",
"named": true
},
{
"type": "identifier",
"named": true
},
{
"type": "mutable_specifier",
"named": true
},
{
"type": "primitive_type",
"named": true
},
{
"type": "self",
"named": true
},
{
"type": "super",
"named": true
},
{
"type": "token_tree",
"named": true
}
]
}
},
{
"type": "dynamic_type",
"named": true,
Expand Down

0 comments on commit 467fd2c

Please sign in to comment.