aboutsummaryrefslogtreecommitdiff
path: root/crates/parser/src/grammar.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/parser/src/grammar.rs')
-rw-r--r--crates/parser/src/grammar.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs
index 9dbd2ebc4..562e92252 100644
--- a/crates/parser/src/grammar.rs
+++ b/crates/parser/src/grammar.rs
@@ -142,19 +142,19 @@ pub(crate) fn reparser(
142) -> Option<fn(&mut Parser)> { 142) -> Option<fn(&mut Parser)> {
143 let res = match node { 143 let res = match node {
144 BLOCK_EXPR => expressions::block_expr, 144 BLOCK_EXPR => expressions::block_expr,
145 RECORD_FIELD_LIST => items::record_field_def_list, 145 RECORD_FIELD_LIST => items::record_field_list,
146 RECORD_EXPR_FIELD_LIST => items::record_field_list, 146 RECORD_EXPR_FIELD_LIST => items::record_expr_field_list,
147 VARIANT_LIST => items::enum_variant_list, 147 VARIANT_LIST => items::variant_list,
148 MATCH_ARM_LIST => items::match_arm_list, 148 MATCH_ARM_LIST => items::match_arm_list,
149 USE_TREE_LIST => items::use_tree_list, 149 USE_TREE_LIST => items::use_tree_list,
150 EXTERN_ITEM_LIST => items::extern_item_list, 150 EXTERN_ITEM_LIST => items::extern_item_list,
151 TOKEN_TREE if first_child? == T!['{'] => items::token_tree, 151 TOKEN_TREE if first_child? == T!['{'] => items::token_tree,
152 ASSOC_ITEM_LIST => match parent? { 152 ASSOC_ITEM_LIST => match parent? {
153 IMPL => items::impl_item_list, 153 IMPL => items::assoc_item_list,
154 TRAIT => items::trait_item_list, 154 TRAIT => items::assoc_item_list,
155 _ => return None, 155 _ => return None,
156 }, 156 },
157 ITEM_LIST => items::mod_item_list, 157 ITEM_LIST => items::item_list,
158 _ => return None, 158 _ => return None,
159 }; 159 };
160 Some(res) 160 Some(res)
@@ -217,7 +217,7 @@ fn opt_visibility(p: &mut Parser) -> bool {
217 true 217 true
218} 218}
219 219
220fn opt_alias(p: &mut Parser) { 220fn opt_rename(p: &mut Parser) {
221 if p.at(T![as]) { 221 if p.at(T![as]) {
222 let m = p.start(); 222 let m = p.start();
223 p.bump(T![as]); 223 p.bump(T![as]);
@@ -239,7 +239,7 @@ fn abi(p: &mut Parser) {
239 abi.complete(p, ABI); 239 abi.complete(p, ABI);
240} 240}
241 241
242fn opt_fn_ret_type(p: &mut Parser) -> bool { 242fn opt_ret_type(p: &mut Parser) -> bool {
243 if p.at(T![->]) { 243 if p.at(T![->]) {
244 let m = p.start(); 244 let m = p.start();
245 p.bump(T![->]); 245 p.bump(T![->]);