aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_assists/src/handlers/add_explicit_type.rs4
-rw-r--r--crates/ra_assists/src/handlers/add_impl.rs2
-rw-r--r--crates/ra_assists/src/handlers/add_new.rs2
-rw-r--r--crates/ra_assists/src/handlers/inline_local_variable.rs2
-rw-r--r--crates/ra_assists/src/handlers/introduce_variable.rs2
-rw-r--r--crates/ra_assists/src/handlers/merge_imports.rs2
-rw-r--r--crates/ra_hir_def/src/body/lower.rs7
-rw-r--r--crates/ra_hir_def/src/data.rs6
-rw-r--r--crates/ra_hir_def/src/generics.rs2
-rw-r--r--crates/ra_hir_def/src/nameres/raw.rs2
-rw-r--r--crates/ra_hir_def/src/path/lower.rs2
-rw-r--r--crates/ra_hir_def/src/path/lower/lower_use.rs2
-rw-r--r--crates/ra_hir_def/src/type_ref.rs4
-rw-r--r--crates/ra_hir_ty/src/tests.rs2
-rw-r--r--crates/ra_ide/src/completion/completion_context.rs5
-rw-r--r--crates/ra_ide/src/references.rs2
-rw-r--r--crates/ra_ide/src/typing.rs2
-rw-r--r--crates/ra_syntax/src/ast.rs2
-rw-r--r--crates/ra_syntax/src/ast/edit.rs10
-rw-r--r--crates/ra_syntax/src/ast/extensions.rs141
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs379
21 files changed, 243 insertions, 339 deletions
diff --git a/crates/ra_assists/src/handlers/add_explicit_type.rs b/crates/ra_assists/src/handlers/add_explicit_type.rs
index d86d804b2..e7dcfb44e 100644
--- a/crates/ra_assists/src/handlers/add_explicit_type.rs
+++ b/crates/ra_assists/src/handlers/add_explicit_type.rs
@@ -1,6 +1,6 @@
1use hir::HirDisplay; 1use hir::HirDisplay;
2use ra_syntax::{ 2use ra_syntax::{
3 ast::{self, AstNode, LetStmt, NameOwner, TypeAscriptionOwner}, 3 ast::{self, AstNode, AstToken, LetStmt, NameOwner, TypeAscriptionOwner},
4 TextRange, 4 TextRange,
5}; 5};
6 6
@@ -35,7 +35,7 @@ pub(crate) fn add_explicit_type(ctx: AssistCtx) -> Option<Assist> {
35 let name = pat.name()?; 35 let name = pat.name()?;
36 let name_range = name.syntax().text_range(); 36 let name_range = name.syntax().text_range();
37 let stmt_range = stmt.syntax().text_range(); 37 let stmt_range = stmt.syntax().text_range();
38 let eq_range = stmt.eq_token()?.text_range(); 38 let eq_range = stmt.eq_token()?.syntax().text_range();
39 // Assist should only be applicable if cursor is between 'let' and '=' 39 // Assist should only be applicable if cursor is between 'let' and '='
40 let let_range = TextRange::from_to(stmt_range.start(), eq_range.start()); 40 let let_range = TextRange::from_to(stmt_range.start(), eq_range.start());
41 let cursor_in_range = ctx.frange.range.is_subrange(&let_range); 41 let cursor_in_range = ctx.frange.range.is_subrange(&let_range);
diff --git a/crates/ra_assists/src/handlers/add_impl.rs b/crates/ra_assists/src/handlers/add_impl.rs
index 72a201b6d..26dfed237 100644
--- a/crates/ra_assists/src/handlers/add_impl.rs
+++ b/crates/ra_assists/src/handlers/add_impl.rs
@@ -42,7 +42,7 @@ pub(crate) fn add_impl(ctx: AssistCtx) -> Option<Assist> {
42 if let Some(type_params) = type_params { 42 if let Some(type_params) = type_params {
43 let lifetime_params = type_params 43 let lifetime_params = type_params
44 .lifetime_params() 44 .lifetime_params()
45 .filter_map(|it| it.lifetime()) 45 .filter_map(|it| it.lifetime_token())
46 .map(|it| it.text().clone()); 46 .map(|it| it.text().clone());
47 let type_params = 47 let type_params =
48 type_params.type_params().filter_map(|it| it.name()).map(|it| it.text().clone()); 48 type_params.type_params().filter_map(|it| it.name()).map(|it| it.text().clone());
diff --git a/crates/ra_assists/src/handlers/add_new.rs b/crates/ra_assists/src/handlers/add_new.rs
index c10397249..30360af94 100644
--- a/crates/ra_assists/src/handlers/add_new.rs
+++ b/crates/ra_assists/src/handlers/add_new.rs
@@ -106,7 +106,7 @@ fn generate_impl_text(strukt: &ast::StructDef, code: &str) -> String {
106 if let Some(type_params) = type_params { 106 if let Some(type_params) = type_params {
107 let lifetime_params = type_params 107 let lifetime_params = type_params
108 .lifetime_params() 108 .lifetime_params()
109 .filter_map(|it| it.lifetime()) 109 .filter_map(|it| it.lifetime_token())
110 .map(|it| it.text().clone()); 110 .map(|it| it.text().clone());
111 let type_params = 111 let type_params =
112 type_params.type_params().filter_map(|it| it.name()).map(|it| it.text().clone()); 112 type_params.type_params().filter_map(|it| it.name()).map(|it| it.text().clone());
diff --git a/crates/ra_assists/src/handlers/inline_local_variable.rs b/crates/ra_assists/src/handlers/inline_local_variable.rs
index 3bfcba8ff..b9eb09676 100644
--- a/crates/ra_assists/src/handlers/inline_local_variable.rs
+++ b/crates/ra_assists/src/handlers/inline_local_variable.rs
@@ -29,7 +29,7 @@ pub(crate) fn inline_local_variable(ctx: AssistCtx) -> Option<Assist> {
29 ast::Pat::BindPat(pat) => pat, 29 ast::Pat::BindPat(pat) => pat,
30 _ => return None, 30 _ => return None,
31 }; 31 };
32 if bind_pat.is_mutable() { 32 if bind_pat.mut_kw_token().is_some() {
33 tested_by!(test_not_inline_mut_variable); 33 tested_by!(test_not_inline_mut_variable);
34 return None; 34 return None;
35 } 35 }
diff --git a/crates/ra_assists/src/handlers/introduce_variable.rs b/crates/ra_assists/src/handlers/introduce_variable.rs
index 8a02f1a32..ab6bdf6bb 100644
--- a/crates/ra_assists/src/handlers/introduce_variable.rs
+++ b/crates/ra_assists/src/handlers/introduce_variable.rs
@@ -61,7 +61,7 @@ pub(crate) fn introduce_variable(ctx: AssistCtx) -> Option<Assist> {
61 }; 61 };
62 if is_full_stmt { 62 if is_full_stmt {
63 tested_by!(test_introduce_var_expr_stmt); 63 tested_by!(test_introduce_var_expr_stmt);
64 if !full_stmt.unwrap().has_semi() { 64 if full_stmt.unwrap().semi_token().is_none() {
65 buf.push_str(";"); 65 buf.push_str(";");
66 } 66 }
67 edit.replace(expr.syntax().text_range(), buf); 67 edit.replace(expr.syntax().text_range(), buf);
diff --git a/crates/ra_assists/src/handlers/merge_imports.rs b/crates/ra_assists/src/handlers/merge_imports.rs
index f8b3ddb4e..936d50ab4 100644
--- a/crates/ra_assists/src/handlers/merge_imports.rs
+++ b/crates/ra_assists/src/handlers/merge_imports.rs
@@ -82,7 +82,7 @@ fn try_merge_trees(old: &ast::UseTree, new: &ast::UseTree) -> Option<ast::UseTre
82 .filter(|it| it.kind() != T!['{'] && it.kind() != T!['}']), 82 .filter(|it| it.kind() != T!['{'] && it.kind() != T!['}']),
83 ); 83 );
84 let use_tree_list = lhs.use_tree_list()?; 84 let use_tree_list = lhs.use_tree_list()?;
85 let pos = InsertPosition::Before(use_tree_list.r_curly()?.syntax().clone().into()); 85 let pos = InsertPosition::Before(use_tree_list.r_curly_token()?.syntax().clone().into());
86 let use_tree_list = use_tree_list.insert_children(pos, to_insert); 86 let use_tree_list = use_tree_list.insert_children(pos, to_insert);
87 Some(lhs.with_use_tree_list(use_tree_list)) 87 Some(lhs.with_use_tree_list(use_tree_list))
88} 88}
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index b02de5d67..c4a5ec59c 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -572,7 +572,10 @@ impl ExprCollector<'_> {
572 let pattern = match &pat { 572 let pattern = match &pat {
573 ast::Pat::BindPat(bp) => { 573 ast::Pat::BindPat(bp) => {
574 let name = bp.name().map(|nr| nr.as_name()).unwrap_or_else(Name::missing); 574 let name = bp.name().map(|nr| nr.as_name()).unwrap_or_else(Name::missing);
575 let annotation = BindingAnnotation::new(bp.is_mutable(), bp.is_ref()); 575 let annotation = BindingAnnotation::new(
576 bp.mut_kw_token().is_some(),
577 bp.ref_kw_token().is_some(),
578 );
576 let subpat = bp.pat().map(|subpat| self.collect_pat(subpat)); 579 let subpat = bp.pat().map(|subpat| self.collect_pat(subpat));
577 if annotation == BindingAnnotation::Unannotated && subpat.is_none() { 580 if annotation == BindingAnnotation::Unannotated && subpat.is_none() {
578 // This could also be a single-segment path pattern. To 581 // This could also be a single-segment path pattern. To
@@ -613,7 +616,7 @@ impl ExprCollector<'_> {
613 } 616 }
614 ast::Pat::RefPat(p) => { 617 ast::Pat::RefPat(p) => {
615 let pat = self.collect_pat_opt(p.pat()); 618 let pat = self.collect_pat_opt(p.pat());
616 let mutability = Mutability::from_mutable(p.is_mut()); 619 let mutability = Mutability::from_mutable(p.mut_kw_token().is_some());
617 Pat::Ref { pat, mutability } 620 Pat::Ref { pat, mutability }
618 } 621 }
619 ast::Pat::PathPat(p) => { 622 ast::Pat::PathPat(p) => {
diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs
index 606ec48b0..689bb6c5c 100644
--- a/crates/ra_hir_def/src/data.rs
+++ b/crates/ra_hir_def/src/data.rs
@@ -75,7 +75,7 @@ impl FunctionData {
75 TypeRef::unit() 75 TypeRef::unit()
76 }; 76 };
77 77
78 let ret_type = if src.value.is_async() { 78 let ret_type = if src.value.async_kw_token().is_some() {
79 let future_impl = desugar_future_path(ret_type); 79 let future_impl = desugar_future_path(ret_type);
80 let ty_bound = TypeBound::Path(future_impl); 80 let ty_bound = TypeBound::Path(future_impl);
81 TypeRef::ImplTrait(vec![ty_bound]) 81 TypeRef::ImplTrait(vec![ty_bound])
@@ -136,7 +136,7 @@ impl TraitData {
136 pub(crate) fn trait_data_query(db: &dyn DefDatabase, tr: TraitId) -> Arc<TraitData> { 136 pub(crate) fn trait_data_query(db: &dyn DefDatabase, tr: TraitId) -> Arc<TraitData> {
137 let src = tr.lookup(db).source(db); 137 let src = tr.lookup(db).source(db);
138 let name = src.value.name().map_or_else(Name::missing, |n| n.as_name()); 138 let name = src.value.name().map_or_else(Name::missing, |n| n.as_name());
139 let auto = src.value.is_auto(); 139 let auto = src.value.auto_kw_token().is_some();
140 let ast_id_map = db.ast_id_map(src.file_id); 140 let ast_id_map = db.ast_id_map(src.file_id);
141 141
142 let container = AssocContainerId::TraitId(tr); 142 let container = AssocContainerId::TraitId(tr);
@@ -213,7 +213,7 @@ impl ImplData {
213 213
214 let target_trait = src.value.target_trait().map(TypeRef::from_ast); 214 let target_trait = src.value.target_trait().map(TypeRef::from_ast);
215 let target_type = TypeRef::from_ast_opt(src.value.target_type()); 215 let target_type = TypeRef::from_ast_opt(src.value.target_type());
216 let is_negative = src.value.is_negative(); 216 let is_negative = src.value.excl_token().is_some();
217 let module_id = impl_loc.container.module(db); 217 let module_id = impl_loc.container.module(db);
218 218
219 let mut items = Vec::new(); 219 let mut items = Vec::new();
diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs
index b687ce2b2..d850244c4 100644
--- a/crates/ra_hir_def/src/generics.rs
+++ b/crates/ra_hir_def/src/generics.rs
@@ -194,7 +194,7 @@ impl GenericParams {
194 } 194 }
195 195
196 fn add_where_predicate_from_bound(&mut self, bound: ast::TypeBound, type_ref: TypeRef) { 196 fn add_where_predicate_from_bound(&mut self, bound: ast::TypeBound, type_ref: TypeRef) {
197 if bound.has_question_mark() { 197 if bound.question_token().is_some() {
198 // FIXME: remove this bound 198 // FIXME: remove this bound
199 return; 199 return;
200 } 200 }
diff --git a/crates/ra_hir_def/src/nameres/raw.rs b/crates/ra_hir_def/src/nameres/raw.rs
index a9dff3a5d..e72ba52cf 100644
--- a/crates/ra_hir_def/src/nameres/raw.rs
+++ b/crates/ra_hir_def/src/nameres/raw.rs
@@ -287,7 +287,7 @@ impl RawItemsCollector {
287 let visibility = RawVisibility::from_ast_with_hygiene(module.visibility(), &self.hygiene); 287 let visibility = RawVisibility::from_ast_with_hygiene(module.visibility(), &self.hygiene);
288 288
289 let ast_id = self.source_ast_id_map.ast_id(&module); 289 let ast_id = self.source_ast_id_map.ast_id(&module);
290 if module.has_semi() { 290 if module.semi_token().is_some() {
291 let item = 291 let item =
292 self.raw_items.modules.alloc(ModuleData::Declaration { name, visibility, ast_id }); 292 self.raw_items.modules.alloc(ModuleData::Declaration { name, visibility, ast_id });
293 self.push_item(current_module, attrs, RawItemKind::Module(item)); 293 self.push_item(current_module, attrs, RawItemKind::Module(item));
diff --git a/crates/ra_hir_def/src/path/lower.rs b/crates/ra_hir_def/src/path/lower.rs
index 3c13cb2c7..0f806d6fb 100644
--- a/crates/ra_hir_def/src/path/lower.rs
+++ b/crates/ra_hir_def/src/path/lower.rs
@@ -28,7 +28,7 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option<Path>
28 loop { 28 loop {
29 let segment = path.segment()?; 29 let segment = path.segment()?;
30 30
31 if segment.coloncolon().is_some() { 31 if segment.coloncolon_token().is_some() {
32 kind = PathKind::Abs; 32 kind = PathKind::Abs;
33 } 33 }
34 34
diff --git a/crates/ra_hir_def/src/path/lower/lower_use.rs b/crates/ra_hir_def/src/path/lower/lower_use.rs
index 6ec944228..5b6854b0f 100644
--- a/crates/ra_hir_def/src/path/lower/lower_use.rs
+++ b/crates/ra_hir_def/src/path/lower/lower_use.rs
@@ -34,7 +34,7 @@ pub(crate) fn lower_use_tree(
34 let alias = tree.alias().map(|a| { 34 let alias = tree.alias().map(|a| {
35 a.name().map(|it| it.as_name()).map_or(ImportAlias::Underscore, ImportAlias::Alias) 35 a.name().map(|it| it.as_name()).map_or(ImportAlias::Underscore, ImportAlias::Alias)
36 }); 36 });
37 let is_glob = tree.star().is_some(); 37 let is_glob = tree.star_token().is_some();
38 if let Some(ast_path) = tree.path() { 38 if let Some(ast_path) = tree.path() {
39 // Handle self in a path. 39 // Handle self in a path.
40 // E.g. `use something::{self, <...>}` 40 // E.g. `use something::{self, <...>}`
diff --git a/crates/ra_hir_def/src/type_ref.rs b/crates/ra_hir_def/src/type_ref.rs
index 01cc392db..7a8338937 100644
--- a/crates/ra_hir_def/src/type_ref.rs
+++ b/crates/ra_hir_def/src/type_ref.rs
@@ -77,7 +77,7 @@ impl TypeRef {
77 } 77 }
78 ast::TypeRef::PointerType(inner) => { 78 ast::TypeRef::PointerType(inner) => {
79 let inner_ty = TypeRef::from_ast_opt(inner.type_ref()); 79 let inner_ty = TypeRef::from_ast_opt(inner.type_ref());
80 let mutability = Mutability::from_mutable(inner.is_mut()); 80 let mutability = Mutability::from_mutable(inner.mut_kw_token().is_some());
81 TypeRef::RawPtr(Box::new(inner_ty), mutability) 81 TypeRef::RawPtr(Box::new(inner_ty), mutability)
82 } 82 }
83 ast::TypeRef::ArrayType(inner) => { 83 ast::TypeRef::ArrayType(inner) => {
@@ -88,7 +88,7 @@ impl TypeRef {
88 } 88 }
89 ast::TypeRef::ReferenceType(inner) => { 89 ast::TypeRef::ReferenceType(inner) => {
90 let inner_ty = TypeRef::from_ast_opt(inner.type_ref()); 90 let inner_ty = TypeRef::from_ast_opt(inner.type_ref());
91 let mutability = Mutability::from_mutable(inner.is_mut()); 91 let mutability = Mutability::from_mutable(inner.mut_kw_token().is_some());
92 TypeRef::Reference(Box::new(inner_ty), mutability) 92 TypeRef::Reference(Box::new(inner_ty), mutability)
93 } 93 }
94 ast::TypeRef::PlaceholderType(_inner) => TypeRef::Placeholder, 94 ast::TypeRef::PlaceholderType(_inner) => TypeRef::Placeholder,
diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs
index ac0966236..f97e0bfeb 100644
--- a/crates/ra_hir_ty/src/tests.rs
+++ b/crates/ra_hir_ty/src/tests.rs
@@ -101,7 +101,7 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String {
101 let node = src_ptr.value.to_node(&src_ptr.file_syntax(&db)); 101 let node = src_ptr.value.to_node(&src_ptr.file_syntax(&db));
102 102
103 let (range, text) = if let Some(self_param) = ast::SelfParam::cast(node.clone()) { 103 let (range, text) = if let Some(self_param) = ast::SelfParam::cast(node.clone()) {
104 (self_param.self_kw().unwrap().syntax().text_range(), "self".to_string()) 104 (self_param.self_kw_token().unwrap().syntax().text_range(), "self".to_string())
105 } else { 105 } else {
106 (src_ptr.value.range(), node.text().to_string().replace("\n", " ")) 106 (src_ptr.value.range(), node.text().to_string().replace("\n", " "))
107 }; 107 };
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs
index f833d2a9a..0e34d85db 100644
--- a/crates/ra_ide/src/completion/completion_context.rs
+++ b/crates/ra_ide/src/completion/completion_context.rs
@@ -190,7 +190,10 @@ impl<'a> CompletionContext<'a> {
190 if let Some(name) = find_node_at_offset::<ast::Name>(&file_with_fake_ident, offset) { 190 if let Some(name) = find_node_at_offset::<ast::Name>(&file_with_fake_ident, offset) {
191 if let Some(bind_pat) = name.syntax().ancestors().find_map(ast::BindPat::cast) { 191 if let Some(bind_pat) = name.syntax().ancestors().find_map(ast::BindPat::cast) {
192 self.is_pat_binding_or_const = true; 192 self.is_pat_binding_or_const = true;
193 if bind_pat.has_at() || bind_pat.is_ref() || bind_pat.is_mutable() { 193 if bind_pat.at_token().is_some()
194 || bind_pat.ref_kw_token().is_some()
195 || bind_pat.mut_kw_token().is_some()
196 {
194 self.is_pat_binding_or_const = false; 197 self.is_pat_binding_or_const = false;
195 } 198 }
196 if bind_pat.syntax().parent().and_then(ast::RecordFieldPatList::cast).is_some() { 199 if bind_pat.syntax().parent().and_then(ast::RecordFieldPatList::cast).is_some() {
diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs
index 746cc86ba..ad6fd50aa 100644
--- a/crates/ra_ide/src/references.rs
+++ b/crates/ra_ide/src/references.rs
@@ -152,7 +152,7 @@ fn decl_access(def: &Definition, syntax: &SyntaxNode, range: TextRange) -> Optio
152 if stmt.initializer().is_some() { 152 if stmt.initializer().is_some() {
153 let pat = stmt.pat()?; 153 let pat = stmt.pat()?;
154 if let ast::Pat::BindPat(it) = pat { 154 if let ast::Pat::BindPat(it) = pat {
155 if it.is_mutable() { 155 if it.mut_kw_token().is_some() {
156 return Some(ReferenceAccess::Write); 156 return Some(ReferenceAccess::Write);
157 } 157 }
158 } 158 }
diff --git a/crates/ra_ide/src/typing.rs b/crates/ra_ide/src/typing.rs
index cb2cd2479..71d2bcb04 100644
--- a/crates/ra_ide/src/typing.rs
+++ b/crates/ra_ide/src/typing.rs
@@ -63,7 +63,7 @@ fn on_char_typed_inner(
63fn on_eq_typed(file: &SourceFile, offset: TextUnit) -> Option<SingleFileChange> { 63fn on_eq_typed(file: &SourceFile, offset: TextUnit) -> Option<SingleFileChange> {
64 assert_eq!(file.syntax().text().char_at(offset), Some('=')); 64 assert_eq!(file.syntax().text().char_at(offset), Some('='));
65 let let_stmt: ast::LetStmt = find_node_at_offset(file.syntax(), offset)?; 65 let let_stmt: ast::LetStmt = find_node_at_offset(file.syntax(), offset)?;
66 if let_stmt.has_semi() { 66 if let_stmt.semi_token().is_some() {
67 return None; 67 return None;
68 } 68 }
69 if let Some(expr) = let_stmt.initializer() { 69 if let Some(expr) = let_stmt.initializer() {
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index a42eec91a..15a8279f3 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -287,7 +287,7 @@ where
287 let pred = predicates.next().unwrap(); 287 let pred = predicates.next().unwrap();
288 let mut bounds = pred.type_bound_list().unwrap().bounds(); 288 let mut bounds = pred.type_bound_list().unwrap().bounds();
289 289
290 assert_eq!("'a", pred.lifetime().unwrap().text()); 290 assert_eq!("'a", pred.lifetime_token().unwrap().text());
291 291
292 assert_bound("'b", bounds.next()); 292 assert_bound("'b", bounds.next());
293 assert_bound("'c", bounds.next()); 293 assert_bound("'c", bounds.next());
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs
index d79310995..069c6ee82 100644
--- a/crates/ra_syntax/src/ast/edit.rs
+++ b/crates/ra_syntax/src/ast/edit.rs
@@ -33,9 +33,9 @@ impl ast::FnDef {
33 let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new(); 33 let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new();
34 let old_body_or_semi: SyntaxElement = if let Some(old_body) = self.body() { 34 let old_body_or_semi: SyntaxElement = if let Some(old_body) = self.body() {
35 old_body.syntax().clone().into() 35 old_body.syntax().clone().into()
36 } else if let Some(semi) = self.semicolon_token() { 36 } else if let Some(semi) = self.semi_token() {
37 to_insert.push(make::tokens::single_space().into()); 37 to_insert.push(make::tokens::single_space().into());
38 semi.into() 38 semi.syntax.clone().into()
39 } else { 39 } else {
40 to_insert.push(make::tokens::single_space().into()); 40 to_insert.push(make::tokens::single_space().into());
41 to_insert.push(body.syntax().clone().into()); 41 to_insert.push(body.syntax().clone().into());
@@ -96,7 +96,7 @@ impl ast::ItemList {
96 leading_indent(it.syntax()).unwrap_or_default().to_string(), 96 leading_indent(it.syntax()).unwrap_or_default().to_string(),
97 InsertPosition::After(it.syntax().clone().into()), 97 InsertPosition::After(it.syntax().clone().into()),
98 ), 98 ),
99 None => match self.l_curly() { 99 None => match self.l_curly_token() {
100 Some(it) => ( 100 Some(it) => (
101 " ".to_string() + &leading_indent(self.syntax()).unwrap_or_default(), 101 " ".to_string() + &leading_indent(self.syntax()).unwrap_or_default(),
102 InsertPosition::After(it.syntax().clone().into()), 102 InsertPosition::After(it.syntax().clone().into()),
@@ -142,7 +142,7 @@ impl ast::RecordFieldList {
142 142
143 macro_rules! after_l_curly { 143 macro_rules! after_l_curly {
144 () => {{ 144 () => {{
145 let anchor = match self.l_curly() { 145 let anchor = match self.l_curly_token() {
146 Some(it) => it.syntax().clone().into(), 146 Some(it) => it.syntax().clone().into(),
147 None => return self.clone(), 147 None => return self.clone(),
148 }; 148 };
@@ -301,7 +301,7 @@ impl ast::UseTree {
301 suffix.clone(), 301 suffix.clone(),
302 self.use_tree_list(), 302 self.use_tree_list(),
303 self.alias(), 303 self.alias(),
304 self.star().is_some(), 304 self.star_token().is_some(),
305 ); 305 );
306 let nested = make::use_tree_list(iter::once(use_tree)); 306 let nested = make::use_tree_list(iter::once(use_tree));
307 return make::use_tree(prefix.clone(), Some(nested), None, false); 307 return make::use_tree(prefix.clone(), Some(nested), None, false);
diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs
index 33fe60762..b50a89864 100644
--- a/crates/ra_syntax/src/ast/extensions.rs
+++ b/crates/ra_syntax/src/ast/extensions.rs
@@ -2,16 +2,14 @@
2//! Extensions for various expressions live in a sibling `expr_extensions` module. 2//! Extensions for various expressions live in a sibling `expr_extensions` module.
3 3
4use itertools::Itertools; 4use itertools::Itertools;
5use ra_parser::SyntaxKind;
5 6
6use crate::{ 7use crate::{
7 ast::{ 8 ast::{
8 self, child_opt, children, support, AstNode, AstToken, AttrInput, NameOwner, SyntaxNode, 9 self, child_opt, children, support, AstNode, AstToken, AttrInput, NameOwner, SyntaxNode,
9 }, 10 },
10 SmolStr, SyntaxElement, 11 SmolStr, SyntaxElement, SyntaxToken, T,
11 SyntaxKind::*,
12 SyntaxToken, T,
13}; 12};
14use ra_parser::SyntaxKind;
15 13
16impl ast::Name { 14impl ast::Name {
17 pub fn text(&self) -> &SmolStr { 15 pub fn text(&self) -> &SmolStr {
@@ -25,13 +23,11 @@ impl ast::NameRef {
25 } 23 }
26 24
27 pub fn as_tuple_field(&self) -> Option<usize> { 25 pub fn as_tuple_field(&self) -> Option<usize> {
28 self.syntax().children_with_tokens().find_map(|c| { 26 if let Some(ast::NameRefToken::IntNumber(token)) = self.name_ref_token_token() {
29 if c.kind() == SyntaxKind::INT_NUMBER { 27 token.text().as_str().parse().ok()
30 c.as_token().and_then(|tok| tok.text().as_str().parse().ok()) 28 } else {
31 } else { 29 None
32 None 30 }
33 }
34 })
35 } 31 }
36} 32}
37 33
@@ -140,15 +136,6 @@ impl ast::Path {
140 } 136 }
141} 137}
142 138
143impl ast::Module {
144 pub fn has_semi(&self) -> bool {
145 match self.syntax().last_child_or_token() {
146 None => false,
147 Some(node) => node.kind() == T![;],
148 }
149 }
150}
151
152impl ast::UseTreeList { 139impl ast::UseTreeList {
153 pub fn parent_use_tree(&self) -> ast::UseTree { 140 pub fn parent_use_tree(&self) -> ast::UseTree {
154 self.syntax() 141 self.syntax()
@@ -179,10 +166,6 @@ impl ast::ImplDef {
179 let second = types.next(); 166 let second = types.next();
180 (first, second) 167 (first, second)
181 } 168 }
182
183 pub fn is_negative(&self) -> bool {
184 self.syntax().children_with_tokens().any(|t| t.kind() == T![!])
185 }
186} 169}
187 170
188#[derive(Debug, Clone, PartialEq, Eq)] 171#[derive(Debug, Clone, PartialEq, Eq)]
@@ -223,41 +206,6 @@ impl ast::EnumVariant {
223 } 206 }
224} 207}
225 208
226impl ast::FnDef {
227 pub fn semicolon_token(&self) -> Option<SyntaxToken> {
228 self.syntax()
229 .last_child_or_token()
230 .and_then(|it| it.into_token())
231 .filter(|it| it.kind() == T![;])
232 }
233
234 pub fn is_async(&self) -> bool {
235 self.syntax().children_with_tokens().any(|it| it.kind() == T![async])
236 }
237}
238
239impl ast::LetStmt {
240 pub fn has_semi(&self) -> bool {
241 match self.syntax().last_child_or_token() {
242 None => false,
243 Some(node) => node.kind() == T![;],
244 }
245 }
246
247 pub fn eq_token(&self) -> Option<SyntaxToken> {
248 self.syntax().children_with_tokens().find(|t| t.kind() == EQ).and_then(|it| it.into_token())
249 }
250}
251
252impl ast::ExprStmt {
253 pub fn has_semi(&self) -> bool {
254 match self.syntax().last_child_or_token() {
255 None => false,
256 Some(node) => node.kind() == T![;],
257 }
258 }
259}
260
261#[derive(Debug, Clone, PartialEq, Eq)] 209#[derive(Debug, Clone, PartialEq, Eq)]
262pub enum FieldKind { 210pub enum FieldKind {
263 Name(ast::NameRef), 211 Name(ast::NameRef),
@@ -286,25 +234,6 @@ impl ast::FieldExpr {
286 } 234 }
287} 235}
288 236
289impl ast::RefPat {
290 pub fn is_mut(&self) -> bool {
291 self.syntax().children_with_tokens().any(|n| n.kind() == T![mut])
292 }
293}
294
295impl ast::BindPat {
296 pub fn is_mutable(&self) -> bool {
297 self.syntax().children_with_tokens().any(|n| n.kind() == T![mut])
298 }
299
300 pub fn is_ref(&self) -> bool {
301 self.syntax().children_with_tokens().any(|n| n.kind() == T![ref])
302 }
303 pub fn has_at(&self) -> bool {
304 self.syntax().children_with_tokens().any(|it| it.kind() == T![@])
305 }
306}
307
308pub struct SlicePatComponents { 237pub struct SlicePatComponents {
309 pub prefix: Vec<ast::Pat>, 238 pub prefix: Vec<ast::Pat>,
310 pub slice: Option<ast::Pat>, 239 pub slice: Option<ast::Pat>,
@@ -339,18 +268,6 @@ impl ast::SlicePat {
339 } 268 }
340} 269}
341 270
342impl ast::PointerType {
343 pub fn is_mut(&self) -> bool {
344 self.syntax().children_with_tokens().any(|n| n.kind() == T![mut])
345 }
346}
347
348impl ast::ReferenceType {
349 pub fn is_mut(&self) -> bool {
350 self.syntax().children_with_tokens().any(|n| n.kind() == T![mut])
351 }
352}
353
354#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] 271#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
355pub enum SelfParamKind { 272pub enum SelfParamKind {
356 /// self 273 /// self
@@ -363,8 +280,8 @@ pub enum SelfParamKind {
363 280
364impl ast::SelfParam { 281impl ast::SelfParam {
365 pub fn kind(&self) -> SelfParamKind { 282 pub fn kind(&self) -> SelfParamKind {
366 if self.amp().is_some() { 283 if self.amp_token().is_some() {
367 if self.amp_mut_kw().is_some() { 284 if self.amp_mut_kw_token().is_some() {
368 SelfParamKind::MutRef 285 SelfParamKind::MutRef
369 } else { 286 } else {
370 SelfParamKind::Ref 287 SelfParamKind::Ref
@@ -375,7 +292,7 @@ impl ast::SelfParam {
375 } 292 }
376 293
377 /// the "mut" in "mut self", not the one in "&mut self" 294 /// the "mut" in "mut self", not the one in "&mut self"
378 pub fn mut_kw(&self) -> Option<ast::MutKw> { 295 pub fn mut_kw_token(&self) -> Option<ast::MutKw> {
379 self.syntax() 296 self.syntax()
380 .children_with_tokens() 297 .children_with_tokens()
381 .filter_map(|it| it.into_token()) 298 .filter_map(|it| it.into_token())
@@ -384,7 +301,7 @@ impl ast::SelfParam {
384 } 301 }
385 302
386 /// the "mut" in "&mut self", not the one in "mut self" 303 /// the "mut" in "&mut self", not the one in "mut self"
387 pub fn amp_mut_kw(&self) -> Option<ast::MutKw> { 304 pub fn amp_mut_kw_token(&self) -> Option<ast::MutKw> {
388 self.syntax() 305 self.syntax()
389 .children_with_tokens() 306 .children_with_tokens()
390 .filter_map(|it| it.into_token()) 307 .filter_map(|it| it.into_token())
@@ -409,18 +326,14 @@ impl ast::TypeBound {
409 TypeBoundKind::PathType(path_type) 326 TypeBoundKind::PathType(path_type)
410 } else if let Some(for_type) = children(self).next() { 327 } else if let Some(for_type) = children(self).next() {
411 TypeBoundKind::ForType(for_type) 328 TypeBoundKind::ForType(for_type)
412 } else if let Some(lifetime) = self.lifetime() { 329 } else if let Some(lifetime) = self.lifetime_token() {
413 TypeBoundKind::Lifetime(lifetime) 330 TypeBoundKind::Lifetime(lifetime)
414 } else { 331 } else {
415 unreachable!() 332 unreachable!()
416 } 333 }
417 } 334 }
418 335
419 pub fn has_question_mark(&self) -> bool { 336 pub fn const_question_token(&self) -> Option<ast::Question> {
420 self.question().is_some()
421 }
422
423 pub fn const_question(&self) -> Option<ast::Question> {
424 self.syntax() 337 self.syntax()
425 .children_with_tokens() 338 .children_with_tokens()
426 .filter_map(|it| it.into_token()) 339 .filter_map(|it| it.into_token())
@@ -428,8 +341,8 @@ impl ast::TypeBound {
428 .find_map(ast::Question::cast) 341 .find_map(ast::Question::cast)
429 } 342 }
430 343
431 pub fn question(&self) -> Option<ast::Question> { 344 pub fn question_token(&self) -> Option<ast::Question> {
432 if self.const_kw().is_some() { 345 if self.const_kw_token().is_some() {
433 self.syntax() 346 self.syntax()
434 .children_with_tokens() 347 .children_with_tokens()
435 .filter_map(|it| it.into_token()) 348 .filter_map(|it| it.into_token())
@@ -441,12 +354,6 @@ impl ast::TypeBound {
441 } 354 }
442} 355}
443 356
444impl ast::TraitDef {
445 pub fn is_auto(&self) -> bool {
446 self.syntax().children_with_tokens().any(|t| t.kind() == T![auto])
447 }
448}
449
450pub enum VisibilityKind { 357pub enum VisibilityKind {
451 In(ast::Path), 358 In(ast::Path),
452 PubCrate, 359 PubCrate,
@@ -459,28 +366,16 @@ impl ast::Visibility {
459 pub fn kind(&self) -> VisibilityKind { 366 pub fn kind(&self) -> VisibilityKind {
460 if let Some(path) = children(self).next() { 367 if let Some(path) = children(self).next() {
461 VisibilityKind::In(path) 368 VisibilityKind::In(path)
462 } else if self.is_pub_crate() { 369 } else if self.crate_kw_token().is_some() {
463 VisibilityKind::PubCrate 370 VisibilityKind::PubCrate
464 } else if self.is_pub_super() { 371 } else if self.super_kw_token().is_some() {
465 VisibilityKind::PubSuper 372 VisibilityKind::PubSuper
466 } else if self.is_pub_self() { 373 } else if self.self_kw_token().is_some() {
467 VisibilityKind::PubSuper 374 VisibilityKind::PubSuper
468 } else { 375 } else {
469 VisibilityKind::Pub 376 VisibilityKind::Pub
470 } 377 }
471 } 378 }
472
473 fn is_pub_crate(&self) -> bool {
474 self.syntax().children_with_tokens().any(|it| it.kind() == T![crate])
475 }
476
477 fn is_pub_super(&self) -> bool {
478 self.syntax().children_with_tokens().any(|it| it.kind() == T![super])
479 }
480
481 fn is_pub_self(&self) -> bool {
482 self.syntax().children_with_tokens().any(|it| it.kind() == T![self])
483 }
484} 379}
485 380
486impl ast::MacroCall { 381impl ast::MacroCall {
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index 8b348ad6e..bcbfd1129 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -49,15 +49,15 @@ impl ast::DocCommentsOwner for FnDef {}
49impl ast::AttrsOwner for FnDef {} 49impl ast::AttrsOwner for FnDef {}
50impl FnDef { 50impl FnDef {
51 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } 51 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
52 pub fn const_kw(&self) -> Option<ConstKw> { support::token(&self.syntax) } 52 pub fn const_kw_token(&self) -> Option<ConstKw> { support::token(&self.syntax) }
53 pub fn default_kw(&self) -> Option<DefaultKw> { support::token(&self.syntax) } 53 pub fn default_kw_token(&self) -> Option<DefaultKw> { support::token(&self.syntax) }
54 pub fn async_kw(&self) -> Option<AsyncKw> { support::token(&self.syntax) } 54 pub fn async_kw_token(&self) -> Option<AsyncKw> { support::token(&self.syntax) }
55 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { support::token(&self.syntax) } 55 pub fn unsafe_kw_token(&self) -> Option<UnsafeKw> { support::token(&self.syntax) }
56 pub fn fn_kw(&self) -> Option<FnKw> { support::token(&self.syntax) } 56 pub fn fn_kw_token(&self) -> Option<FnKw> { support::token(&self.syntax) }
57 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 57 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
58 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 58 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
59 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } 59 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
60 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) } 60 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
61} 61}
62#[derive(Debug, Clone, PartialEq, Eq, Hash)] 62#[derive(Debug, Clone, PartialEq, Eq, Hash)]
63pub struct RetType { 63pub struct RetType {
@@ -75,7 +75,7 @@ impl AstNode for RetType {
75 fn syntax(&self) -> &SyntaxNode { &self.syntax } 75 fn syntax(&self) -> &SyntaxNode { &self.syntax }
76} 76}
77impl RetType { 77impl RetType {
78 pub fn thin_arrow(&self) -> Option<ThinArrow> { support::token(&self.syntax) } 78 pub fn thin_arrow_token(&self) -> Option<ThinArrow> { support::token(&self.syntax) }
79 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 79 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
80} 80}
81#[derive(Debug, Clone, PartialEq, Eq, Hash)] 81#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -99,9 +99,9 @@ impl ast::TypeParamsOwner for StructDef {}
99impl ast::AttrsOwner for StructDef {} 99impl ast::AttrsOwner for StructDef {}
100impl ast::DocCommentsOwner for StructDef {} 100impl ast::DocCommentsOwner for StructDef {}
101impl StructDef { 101impl StructDef {
102 pub fn struct_kw(&self) -> Option<StructKw> { support::token(&self.syntax) } 102 pub fn struct_kw_token(&self) -> Option<StructKw> { support::token(&self.syntax) }
103 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) } 103 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) }
104 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) } 104 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
105} 105}
106#[derive(Debug, Clone, PartialEq, Eq, Hash)] 106#[derive(Debug, Clone, PartialEq, Eq, Hash)]
107pub struct UnionDef { 107pub struct UnionDef {
@@ -124,7 +124,7 @@ impl ast::TypeParamsOwner for UnionDef {}
124impl ast::AttrsOwner for UnionDef {} 124impl ast::AttrsOwner for UnionDef {}
125impl ast::DocCommentsOwner for UnionDef {} 125impl ast::DocCommentsOwner for UnionDef {}
126impl UnionDef { 126impl UnionDef {
127 pub fn union_kw(&self) -> Option<UnionKw> { support::token(&self.syntax) } 127 pub fn union_kw_token(&self) -> Option<UnionKw> { support::token(&self.syntax) }
128 pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> { 128 pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> {
129 support::child(&self.syntax) 129 support::child(&self.syntax)
130 } 130 }
@@ -145,9 +145,9 @@ impl AstNode for RecordFieldDefList {
145 fn syntax(&self) -> &SyntaxNode { &self.syntax } 145 fn syntax(&self) -> &SyntaxNode { &self.syntax }
146} 146}
147impl RecordFieldDefList { 147impl RecordFieldDefList {
148 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) } 148 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) }
149 pub fn fields(&self) -> AstChildren<RecordFieldDef> { support::children(&self.syntax) } 149 pub fn fields(&self) -> AstChildren<RecordFieldDef> { support::children(&self.syntax) }
150 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) } 150 pub fn r_curly_token(&self) -> Option<RCurly> { support::token(&self.syntax) }
151} 151}
152#[derive(Debug, Clone, PartialEq, Eq, Hash)] 152#[derive(Debug, Clone, PartialEq, Eq, Hash)]
153pub struct RecordFieldDef { 153pub struct RecordFieldDef {
@@ -186,9 +186,9 @@ impl AstNode for TupleFieldDefList {
186 fn syntax(&self) -> &SyntaxNode { &self.syntax } 186 fn syntax(&self) -> &SyntaxNode { &self.syntax }
187} 187}
188impl TupleFieldDefList { 188impl TupleFieldDefList {
189 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) } 189 pub fn l_paren_token(&self) -> Option<LParen> { support::token(&self.syntax) }
190 pub fn fields(&self) -> AstChildren<TupleFieldDef> { support::children(&self.syntax) } 190 pub fn fields(&self) -> AstChildren<TupleFieldDef> { support::children(&self.syntax) }
191 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) } 191 pub fn r_paren_token(&self) -> Option<RParen> { support::token(&self.syntax) }
192} 192}
193#[derive(Debug, Clone, PartialEq, Eq, Hash)] 193#[derive(Debug, Clone, PartialEq, Eq, Hash)]
194pub struct TupleFieldDef { 194pub struct TupleFieldDef {
@@ -231,7 +231,7 @@ impl ast::TypeParamsOwner for EnumDef {}
231impl ast::AttrsOwner for EnumDef {} 231impl ast::AttrsOwner for EnumDef {}
232impl ast::DocCommentsOwner for EnumDef {} 232impl ast::DocCommentsOwner for EnumDef {}
233impl EnumDef { 233impl EnumDef {
234 pub fn enum_kw(&self) -> Option<EnumKw> { support::token(&self.syntax) } 234 pub fn enum_kw_token(&self) -> Option<EnumKw> { support::token(&self.syntax) }
235 pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) } 235 pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) }
236} 236}
237#[derive(Debug, Clone, PartialEq, Eq, Hash)] 237#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -250,9 +250,9 @@ impl AstNode for EnumVariantList {
250 fn syntax(&self) -> &SyntaxNode { &self.syntax } 250 fn syntax(&self) -> &SyntaxNode { &self.syntax }
251} 251}
252impl EnumVariantList { 252impl EnumVariantList {
253 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) } 253 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) }
254 pub fn variants(&self) -> AstChildren<EnumVariant> { support::children(&self.syntax) } 254 pub fn variants(&self) -> AstChildren<EnumVariant> { support::children(&self.syntax) }
255 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) } 255 pub fn r_curly_token(&self) -> Option<RCurly> { support::token(&self.syntax) }
256} 256}
257#[derive(Debug, Clone, PartialEq, Eq, Hash)] 257#[derive(Debug, Clone, PartialEq, Eq, Hash)]
258pub struct EnumVariant { 258pub struct EnumVariant {
@@ -275,7 +275,7 @@ impl ast::DocCommentsOwner for EnumVariant {}
275impl ast::AttrsOwner for EnumVariant {} 275impl ast::AttrsOwner for EnumVariant {}
276impl EnumVariant { 276impl EnumVariant {
277 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) } 277 pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) }
278 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) } 278 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
279 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 279 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
280} 280}
281#[derive(Debug, Clone, PartialEq, Eq, Hash)] 281#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -300,9 +300,9 @@ impl ast::DocCommentsOwner for TraitDef {}
300impl ast::TypeParamsOwner for TraitDef {} 300impl ast::TypeParamsOwner for TraitDef {}
301impl ast::TypeBoundsOwner for TraitDef {} 301impl ast::TypeBoundsOwner for TraitDef {}
302impl TraitDef { 302impl TraitDef {
303 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { support::token(&self.syntax) } 303 pub fn unsafe_kw_token(&self) -> Option<UnsafeKw> { support::token(&self.syntax) }
304 pub fn auto_kw(&self) -> Option<AutoKw> { support::token(&self.syntax) } 304 pub fn auto_kw_token(&self) -> Option<AutoKw> { support::token(&self.syntax) }
305 pub fn trait_kw(&self) -> Option<TraitKw> { support::token(&self.syntax) } 305 pub fn trait_kw_token(&self) -> Option<TraitKw> { support::token(&self.syntax) }
306 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 306 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
307} 307}
308#[derive(Debug, Clone, PartialEq, Eq, Hash)] 308#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -325,9 +325,9 @@ impl ast::NameOwner for Module {}
325impl ast::AttrsOwner for Module {} 325impl ast::AttrsOwner for Module {}
326impl ast::DocCommentsOwner for Module {} 326impl ast::DocCommentsOwner for Module {}
327impl Module { 327impl Module {
328 pub fn mod_kw(&self) -> Option<ModKw> { support::token(&self.syntax) } 328 pub fn mod_kw_token(&self) -> Option<ModKw> { support::token(&self.syntax) }
329 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 329 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
330 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) } 330 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
331} 331}
332#[derive(Debug, Clone, PartialEq, Eq, Hash)] 332#[derive(Debug, Clone, PartialEq, Eq, Hash)]
333pub struct ItemList { 333pub struct ItemList {
@@ -347,9 +347,9 @@ impl AstNode for ItemList {
347impl ast::FnDefOwner for ItemList {} 347impl ast::FnDefOwner for ItemList {}
348impl ast::ModuleItemOwner for ItemList {} 348impl ast::ModuleItemOwner for ItemList {}
349impl ItemList { 349impl ItemList {
350 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) } 350 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) }
351 pub fn impl_items(&self) -> AstChildren<ImplItem> { support::children(&self.syntax) } 351 pub fn impl_items(&self) -> AstChildren<ImplItem> { support::children(&self.syntax) }
352 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) } 352 pub fn r_curly_token(&self) -> Option<RCurly> { support::token(&self.syntax) }
353} 353}
354#[derive(Debug, Clone, PartialEq, Eq, Hash)] 354#[derive(Debug, Clone, PartialEq, Eq, Hash)]
355pub struct ConstDef { 355pub struct ConstDef {
@@ -373,11 +373,11 @@ impl ast::AttrsOwner for ConstDef {}
373impl ast::DocCommentsOwner for ConstDef {} 373impl ast::DocCommentsOwner for ConstDef {}
374impl ast::TypeAscriptionOwner for ConstDef {} 374impl ast::TypeAscriptionOwner for ConstDef {}
375impl ConstDef { 375impl ConstDef {
376 pub fn default_kw(&self) -> Option<DefaultKw> { support::token(&self.syntax) } 376 pub fn default_kw_token(&self) -> Option<DefaultKw> { support::token(&self.syntax) }
377 pub fn const_kw(&self) -> Option<ConstKw> { support::token(&self.syntax) } 377 pub fn const_kw_token(&self) -> Option<ConstKw> { support::token(&self.syntax) }
378 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) } 378 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
379 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 379 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
380 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) } 380 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
381} 381}
382#[derive(Debug, Clone, PartialEq, Eq, Hash)] 382#[derive(Debug, Clone, PartialEq, Eq, Hash)]
383pub struct StaticDef { 383pub struct StaticDef {
@@ -401,11 +401,11 @@ impl ast::AttrsOwner for StaticDef {}
401impl ast::DocCommentsOwner for StaticDef {} 401impl ast::DocCommentsOwner for StaticDef {}
402impl ast::TypeAscriptionOwner for StaticDef {} 402impl ast::TypeAscriptionOwner for StaticDef {}
403impl StaticDef { 403impl StaticDef {
404 pub fn static_kw(&self) -> Option<StaticKw> { support::token(&self.syntax) } 404 pub fn static_kw_token(&self) -> Option<StaticKw> { support::token(&self.syntax) }
405 pub fn mut_kw(&self) -> Option<MutKw> { support::token(&self.syntax) } 405 pub fn mut_kw_token(&self) -> Option<MutKw> { support::token(&self.syntax) }
406 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) } 406 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
407 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 407 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
408 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) } 408 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
409} 409}
410#[derive(Debug, Clone, PartialEq, Eq, Hash)] 410#[derive(Debug, Clone, PartialEq, Eq, Hash)]
411pub struct TypeAliasDef { 411pub struct TypeAliasDef {
@@ -429,11 +429,11 @@ impl ast::AttrsOwner for TypeAliasDef {}
429impl ast::DocCommentsOwner for TypeAliasDef {} 429impl ast::DocCommentsOwner for TypeAliasDef {}
430impl ast::TypeBoundsOwner for TypeAliasDef {} 430impl ast::TypeBoundsOwner for TypeAliasDef {}
431impl TypeAliasDef { 431impl TypeAliasDef {
432 pub fn default_kw(&self) -> Option<DefaultKw> { support::token(&self.syntax) } 432 pub fn default_kw_token(&self) -> Option<DefaultKw> { support::token(&self.syntax) }
433 pub fn type_kw(&self) -> Option<TypeKw> { support::token(&self.syntax) } 433 pub fn type_kw_token(&self) -> Option<TypeKw> { support::token(&self.syntax) }
434 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) } 434 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
435 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 435 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
436 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) } 436 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
437} 437}
438#[derive(Debug, Clone, PartialEq, Eq, Hash)] 438#[derive(Debug, Clone, PartialEq, Eq, Hash)]
439pub struct ImplDef { 439pub struct ImplDef {
@@ -453,12 +453,12 @@ impl AstNode for ImplDef {
453impl ast::TypeParamsOwner for ImplDef {} 453impl ast::TypeParamsOwner for ImplDef {}
454impl ast::AttrsOwner for ImplDef {} 454impl ast::AttrsOwner for ImplDef {}
455impl ImplDef { 455impl ImplDef {
456 pub fn default_kw(&self) -> Option<DefaultKw> { support::token(&self.syntax) } 456 pub fn default_kw_token(&self) -> Option<DefaultKw> { support::token(&self.syntax) }
457 pub fn const_kw(&self) -> Option<ConstKw> { support::token(&self.syntax) } 457 pub fn const_kw_token(&self) -> Option<ConstKw> { support::token(&self.syntax) }
458 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { support::token(&self.syntax) } 458 pub fn unsafe_kw_token(&self) -> Option<UnsafeKw> { support::token(&self.syntax) }
459 pub fn impl_kw(&self) -> Option<ImplKw> { support::token(&self.syntax) } 459 pub fn impl_kw_token(&self) -> Option<ImplKw> { support::token(&self.syntax) }
460 pub fn excl(&self) -> Option<Excl> { support::token(&self.syntax) } 460 pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) }
461 pub fn for_kw(&self) -> Option<ForKw> { support::token(&self.syntax) } 461 pub fn for_kw_token(&self) -> Option<ForKw> { support::token(&self.syntax) }
462 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) } 462 pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
463} 463}
464#[derive(Debug, Clone, PartialEq, Eq, Hash)] 464#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -477,9 +477,9 @@ impl AstNode for ParenType {
477 fn syntax(&self) -> &SyntaxNode { &self.syntax } 477 fn syntax(&self) -> &SyntaxNode { &self.syntax }
478} 478}
479impl ParenType { 479impl ParenType {
480 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) } 480 pub fn l_paren_token(&self) -> Option<LParen> { support::token(&self.syntax) }
481 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 481 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
482 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) } 482 pub fn r_paren_token(&self) -> Option<RParen> { support::token(&self.syntax) }
483} 483}
484#[derive(Debug, Clone, PartialEq, Eq, Hash)] 484#[derive(Debug, Clone, PartialEq, Eq, Hash)]
485pub struct TupleType { 485pub struct TupleType {
@@ -497,9 +497,9 @@ impl AstNode for TupleType {
497 fn syntax(&self) -> &SyntaxNode { &self.syntax } 497 fn syntax(&self) -> &SyntaxNode { &self.syntax }
498} 498}
499impl TupleType { 499impl TupleType {
500 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) } 500 pub fn l_paren_token(&self) -> Option<LParen> { support::token(&self.syntax) }
501 pub fn fields(&self) -> AstChildren<TypeRef> { support::children(&self.syntax) } 501 pub fn fields(&self) -> AstChildren<TypeRef> { support::children(&self.syntax) }
502 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) } 502 pub fn r_paren_token(&self) -> Option<RParen> { support::token(&self.syntax) }
503} 503}
504#[derive(Debug, Clone, PartialEq, Eq, Hash)] 504#[derive(Debug, Clone, PartialEq, Eq, Hash)]
505pub struct NeverType { 505pub struct NeverType {
@@ -517,7 +517,7 @@ impl AstNode for NeverType {
517 fn syntax(&self) -> &SyntaxNode { &self.syntax } 517 fn syntax(&self) -> &SyntaxNode { &self.syntax }
518} 518}
519impl NeverType { 519impl NeverType {
520 pub fn excl(&self) -> Option<Excl> { support::token(&self.syntax) } 520 pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) }
521} 521}
522#[derive(Debug, Clone, PartialEq, Eq, Hash)] 522#[derive(Debug, Clone, PartialEq, Eq, Hash)]
523pub struct PathType { 523pub struct PathType {
@@ -553,8 +553,9 @@ impl AstNode for PointerType {
553 fn syntax(&self) -> &SyntaxNode { &self.syntax } 553 fn syntax(&self) -> &SyntaxNode { &self.syntax }
554} 554}
555impl PointerType { 555impl PointerType {
556 pub fn star(&self) -> Option<Star> { support::token(&self.syntax) } 556 pub fn star_token(&self) -> Option<Star> { support::token(&self.syntax) }
557 pub fn const_kw(&self) -> Option<ConstKw> { support::token(&self.syntax) } 557 pub fn const_kw_token(&self) -> Option<ConstKw> { support::token(&self.syntax) }
558 pub fn mut_kw_token(&self) -> Option<MutKw> { support::token(&self.syntax) }
558 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 559 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
559} 560}
560#[derive(Debug, Clone, PartialEq, Eq, Hash)] 561#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -573,11 +574,11 @@ impl AstNode for ArrayType {
573 fn syntax(&self) -> &SyntaxNode { &self.syntax } 574 fn syntax(&self) -> &SyntaxNode { &self.syntax }
574} 575}
575impl ArrayType { 576impl ArrayType {
576 pub fn l_brack(&self) -> Option<LBrack> { support::token(&self.syntax) } 577 pub fn l_brack_token(&self) -> Option<LBrack> { support::token(&self.syntax) }
577 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 578 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
578 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) } 579 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
579 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 580 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
580 pub fn r_brack(&self) -> Option<RBrack> { support::token(&self.syntax) } 581 pub fn r_brack_token(&self) -> Option<RBrack> { support::token(&self.syntax) }
581} 582}
582#[derive(Debug, Clone, PartialEq, Eq, Hash)] 583#[derive(Debug, Clone, PartialEq, Eq, Hash)]
583pub struct SliceType { 584pub struct SliceType {
@@ -595,9 +596,9 @@ impl AstNode for SliceType {
595 fn syntax(&self) -> &SyntaxNode { &self.syntax } 596 fn syntax(&self) -> &SyntaxNode { &self.syntax }
596} 597}
597impl SliceType { 598impl SliceType {
598 pub fn l_brack(&self) -> Option<LBrack> { support::token(&self.syntax) } 599 pub fn l_brack_token(&self) -> Option<LBrack> { support::token(&self.syntax) }
599 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 600 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
600 pub fn r_brack(&self) -> Option<RBrack> { support::token(&self.syntax) } 601 pub fn r_brack_token(&self) -> Option<RBrack> { support::token(&self.syntax) }
601} 602}
602#[derive(Debug, Clone, PartialEq, Eq, Hash)] 603#[derive(Debug, Clone, PartialEq, Eq, Hash)]
603pub struct ReferenceType { 604pub struct ReferenceType {
@@ -615,9 +616,9 @@ impl AstNode for ReferenceType {
615 fn syntax(&self) -> &SyntaxNode { &self.syntax } 616 fn syntax(&self) -> &SyntaxNode { &self.syntax }
616} 617}
617impl ReferenceType { 618impl ReferenceType {
618 pub fn amp(&self) -> Option<Amp> { support::token(&self.syntax) } 619 pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) }
619 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) } 620 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
620 pub fn mut_kw(&self) -> Option<MutKw> { support::token(&self.syntax) } 621 pub fn mut_kw_token(&self) -> Option<MutKw> { support::token(&self.syntax) }
621 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 622 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
622} 623}
623#[derive(Debug, Clone, PartialEq, Eq, Hash)] 624#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -636,7 +637,7 @@ impl AstNode for PlaceholderType {
636 fn syntax(&self) -> &SyntaxNode { &self.syntax } 637 fn syntax(&self) -> &SyntaxNode { &self.syntax }
637} 638}
638impl PlaceholderType { 639impl PlaceholderType {
639 pub fn underscore(&self) -> Option<Underscore> { support::token(&self.syntax) } 640 pub fn underscore_token(&self) -> Option<Underscore> { support::token(&self.syntax) }
640} 641}
641#[derive(Debug, Clone, PartialEq, Eq, Hash)] 642#[derive(Debug, Clone, PartialEq, Eq, Hash)]
642pub struct FnPointerType { 643pub struct FnPointerType {
@@ -655,8 +656,8 @@ impl AstNode for FnPointerType {
655} 656}
656impl FnPointerType { 657impl FnPointerType {
657 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } 658 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
658 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { support::token(&self.syntax) } 659 pub fn unsafe_kw_token(&self) -> Option<UnsafeKw> { support::token(&self.syntax) }
659 pub fn fn_kw(&self) -> Option<FnKw> { support::token(&self.syntax) } 660 pub fn fn_kw_token(&self) -> Option<FnKw> { support::token(&self.syntax) }
660 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 661 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
661 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 662 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
662} 663}
@@ -676,7 +677,7 @@ impl AstNode for ForType {
676 fn syntax(&self) -> &SyntaxNode { &self.syntax } 677 fn syntax(&self) -> &SyntaxNode { &self.syntax }
677} 678}
678impl ForType { 679impl ForType {
679 pub fn for_kw(&self) -> Option<ForKw> { support::token(&self.syntax) } 680 pub fn for_kw_token(&self) -> Option<ForKw> { support::token(&self.syntax) }
680 pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) } 681 pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) }
681 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 682 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
682} 683}
@@ -697,7 +698,7 @@ impl AstNode for ImplTraitType {
697} 698}
698impl ast::TypeBoundsOwner for ImplTraitType {} 699impl ast::TypeBoundsOwner for ImplTraitType {}
699impl ImplTraitType { 700impl ImplTraitType {
700 pub fn impl_kw(&self) -> Option<ImplKw> { support::token(&self.syntax) } 701 pub fn impl_kw_token(&self) -> Option<ImplKw> { support::token(&self.syntax) }
701} 702}
702#[derive(Debug, Clone, PartialEq, Eq, Hash)] 703#[derive(Debug, Clone, PartialEq, Eq, Hash)]
703pub struct DynTraitType { 704pub struct DynTraitType {
@@ -716,7 +717,7 @@ impl AstNode for DynTraitType {
716} 717}
717impl ast::TypeBoundsOwner for DynTraitType {} 718impl ast::TypeBoundsOwner for DynTraitType {}
718impl DynTraitType { 719impl DynTraitType {
719 pub fn dyn_kw(&self) -> Option<DynKw> { support::token(&self.syntax) } 720 pub fn dyn_kw_token(&self) -> Option<DynKw> { support::token(&self.syntax) }
720} 721}
721#[derive(Debug, Clone, PartialEq, Eq, Hash)] 722#[derive(Debug, Clone, PartialEq, Eq, Hash)]
722pub struct TupleExpr { 723pub struct TupleExpr {
@@ -735,9 +736,9 @@ impl AstNode for TupleExpr {
735} 736}
736impl ast::AttrsOwner for TupleExpr {} 737impl ast::AttrsOwner for TupleExpr {}
737impl TupleExpr { 738impl TupleExpr {
738 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) } 739 pub fn l_paren_token(&self) -> Option<LParen> { support::token(&self.syntax) }
739 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) } 740 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
740 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) } 741 pub fn r_paren_token(&self) -> Option<RParen> { support::token(&self.syntax) }
741} 742}
742#[derive(Debug, Clone, PartialEq, Eq, Hash)] 743#[derive(Debug, Clone, PartialEq, Eq, Hash)]
743pub struct ArrayExpr { 744pub struct ArrayExpr {
@@ -756,10 +757,10 @@ impl AstNode for ArrayExpr {
756} 757}
757impl ast::AttrsOwner for ArrayExpr {} 758impl ast::AttrsOwner for ArrayExpr {}
758impl ArrayExpr { 759impl ArrayExpr {
759 pub fn l_brack(&self) -> Option<LBrack> { support::token(&self.syntax) } 760 pub fn l_brack_token(&self) -> Option<LBrack> { support::token(&self.syntax) }
760 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) } 761 pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
761 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) } 762 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
762 pub fn r_brack(&self) -> Option<RBrack> { support::token(&self.syntax) } 763 pub fn r_brack_token(&self) -> Option<RBrack> { support::token(&self.syntax) }
763} 764}
764#[derive(Debug, Clone, PartialEq, Eq, Hash)] 765#[derive(Debug, Clone, PartialEq, Eq, Hash)]
765pub struct ParenExpr { 766pub struct ParenExpr {
@@ -778,9 +779,9 @@ impl AstNode for ParenExpr {
778} 779}
779impl ast::AttrsOwner for ParenExpr {} 780impl ast::AttrsOwner for ParenExpr {}
780impl ParenExpr { 781impl ParenExpr {
781 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) } 782 pub fn l_paren_token(&self) -> Option<LParen> { support::token(&self.syntax) }
782 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 783 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
783 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) } 784 pub fn r_paren_token(&self) -> Option<RParen> { support::token(&self.syntax) }
784} 785}
785#[derive(Debug, Clone, PartialEq, Eq, Hash)] 786#[derive(Debug, Clone, PartialEq, Eq, Hash)]
786pub struct PathExpr { 787pub struct PathExpr {
@@ -817,9 +818,9 @@ impl AstNode for LambdaExpr {
817} 818}
818impl ast::AttrsOwner for LambdaExpr {} 819impl ast::AttrsOwner for LambdaExpr {}
819impl LambdaExpr { 820impl LambdaExpr {
820 pub fn static_kw(&self) -> Option<StaticKw> { support::token(&self.syntax) } 821 pub fn static_kw_token(&self) -> Option<StaticKw> { support::token(&self.syntax) }
821 pub fn async_kw(&self) -> Option<AsyncKw> { support::token(&self.syntax) } 822 pub fn async_kw_token(&self) -> Option<AsyncKw> { support::token(&self.syntax) }
822 pub fn move_kw(&self) -> Option<MoveKw> { support::token(&self.syntax) } 823 pub fn move_kw_token(&self) -> Option<MoveKw> { support::token(&self.syntax) }
823 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 824 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
824 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 825 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
825 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } 826 pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
@@ -841,7 +842,7 @@ impl AstNode for IfExpr {
841} 842}
842impl ast::AttrsOwner for IfExpr {} 843impl ast::AttrsOwner for IfExpr {}
843impl IfExpr { 844impl IfExpr {
844 pub fn if_kw(&self) -> Option<IfKw> { support::token(&self.syntax) } 845 pub fn if_kw_token(&self) -> Option<IfKw> { support::token(&self.syntax) }
845 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } 846 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
846} 847}
847#[derive(Debug, Clone, PartialEq, Eq, Hash)] 848#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -862,7 +863,7 @@ impl AstNode for LoopExpr {
862impl ast::AttrsOwner for LoopExpr {} 863impl ast::AttrsOwner for LoopExpr {}
863impl ast::LoopBodyOwner for LoopExpr {} 864impl ast::LoopBodyOwner for LoopExpr {}
864impl LoopExpr { 865impl LoopExpr {
865 pub fn loop_kw(&self) -> Option<LoopKw> { support::token(&self.syntax) } 866 pub fn loop_kw_token(&self) -> Option<LoopKw> { support::token(&self.syntax) }
866} 867}
867#[derive(Debug, Clone, PartialEq, Eq, Hash)] 868#[derive(Debug, Clone, PartialEq, Eq, Hash)]
868pub struct TryBlockExpr { 869pub struct TryBlockExpr {
@@ -881,7 +882,7 @@ impl AstNode for TryBlockExpr {
881} 882}
882impl ast::AttrsOwner for TryBlockExpr {} 883impl ast::AttrsOwner for TryBlockExpr {}
883impl TryBlockExpr { 884impl TryBlockExpr {
884 pub fn try_kw(&self) -> Option<TryKw> { support::token(&self.syntax) } 885 pub fn try_kw_token(&self) -> Option<TryKw> { support::token(&self.syntax) }
885 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) } 886 pub fn body(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
886} 887}
887#[derive(Debug, Clone, PartialEq, Eq, Hash)] 888#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -902,9 +903,9 @@ impl AstNode for ForExpr {
902impl ast::AttrsOwner for ForExpr {} 903impl ast::AttrsOwner for ForExpr {}
903impl ast::LoopBodyOwner for ForExpr {} 904impl ast::LoopBodyOwner for ForExpr {}
904impl ForExpr { 905impl ForExpr {
905 pub fn for_kw(&self) -> Option<ForKw> { support::token(&self.syntax) } 906 pub fn for_kw_token(&self) -> Option<ForKw> { support::token(&self.syntax) }
906 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 907 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
907 pub fn in_kw(&self) -> Option<InKw> { support::token(&self.syntax) } 908 pub fn in_kw_token(&self) -> Option<InKw> { support::token(&self.syntax) }
908 pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) } 909 pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) }
909} 910}
910#[derive(Debug, Clone, PartialEq, Eq, Hash)] 911#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -925,7 +926,7 @@ impl AstNode for WhileExpr {
925impl ast::AttrsOwner for WhileExpr {} 926impl ast::AttrsOwner for WhileExpr {}
926impl ast::LoopBodyOwner for WhileExpr {} 927impl ast::LoopBodyOwner for WhileExpr {}
927impl WhileExpr { 928impl WhileExpr {
928 pub fn while_kw(&self) -> Option<WhileKw> { support::token(&self.syntax) } 929 pub fn while_kw_token(&self) -> Option<WhileKw> { support::token(&self.syntax) }
929 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) } 930 pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
930} 931}
931#[derive(Debug, Clone, PartialEq, Eq, Hash)] 932#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -945,8 +946,8 @@ impl AstNode for ContinueExpr {
945} 946}
946impl ast::AttrsOwner for ContinueExpr {} 947impl ast::AttrsOwner for ContinueExpr {}
947impl ContinueExpr { 948impl ContinueExpr {
948 pub fn continue_kw(&self) -> Option<ContinueKw> { support::token(&self.syntax) } 949 pub fn continue_kw_token(&self) -> Option<ContinueKw> { support::token(&self.syntax) }
949 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) } 950 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
950} 951}
951#[derive(Debug, Clone, PartialEq, Eq, Hash)] 952#[derive(Debug, Clone, PartialEq, Eq, Hash)]
952pub struct BreakExpr { 953pub struct BreakExpr {
@@ -965,8 +966,8 @@ impl AstNode for BreakExpr {
965} 966}
966impl ast::AttrsOwner for BreakExpr {} 967impl ast::AttrsOwner for BreakExpr {}
967impl BreakExpr { 968impl BreakExpr {
968 pub fn break_kw(&self) -> Option<BreakKw> { support::token(&self.syntax) } 969 pub fn break_kw_token(&self) -> Option<BreakKw> { support::token(&self.syntax) }
969 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) } 970 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
970 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 971 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
971} 972}
972#[derive(Debug, Clone, PartialEq, Eq, Hash)] 973#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -985,7 +986,7 @@ impl AstNode for Label {
985 fn syntax(&self) -> &SyntaxNode { &self.syntax } 986 fn syntax(&self) -> &SyntaxNode { &self.syntax }
986} 987}
987impl Label { 988impl Label {
988 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) } 989 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
989} 990}
990#[derive(Debug, Clone, PartialEq, Eq, Hash)] 991#[derive(Debug, Clone, PartialEq, Eq, Hash)]
991pub struct BlockExpr { 992pub struct BlockExpr {
@@ -1005,7 +1006,7 @@ impl AstNode for BlockExpr {
1005impl ast::AttrsOwner for BlockExpr {} 1006impl ast::AttrsOwner for BlockExpr {}
1006impl BlockExpr { 1007impl BlockExpr {
1007 pub fn label(&self) -> Option<Label> { support::child(&self.syntax) } 1008 pub fn label(&self) -> Option<Label> { support::child(&self.syntax) }
1008 pub fn unsafe_kw(&self) -> Option<UnsafeKw> { support::token(&self.syntax) } 1009 pub fn unsafe_kw_token(&self) -> Option<UnsafeKw> { support::token(&self.syntax) }
1009 pub fn block(&self) -> Option<Block> { support::child(&self.syntax) } 1010 pub fn block(&self) -> Option<Block> { support::child(&self.syntax) }
1010} 1011}
1011#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1012#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1065,7 +1066,7 @@ impl ast::AttrsOwner for MethodCallExpr {}
1065impl ast::ArgListOwner for MethodCallExpr {} 1066impl ast::ArgListOwner for MethodCallExpr {}
1066impl MethodCallExpr { 1067impl MethodCallExpr {
1067 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1068 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1068 pub fn dot(&self) -> Option<Dot> { support::token(&self.syntax) } 1069 pub fn dot_token(&self) -> Option<Dot> { support::token(&self.syntax) }
1069 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 1070 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1070 pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) } 1071 pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) }
1071} 1072}
@@ -1086,8 +1087,8 @@ impl AstNode for IndexExpr {
1086} 1087}
1087impl ast::AttrsOwner for IndexExpr {} 1088impl ast::AttrsOwner for IndexExpr {}
1088impl IndexExpr { 1089impl IndexExpr {
1089 pub fn l_brack(&self) -> Option<LBrack> { support::token(&self.syntax) } 1090 pub fn l_brack_token(&self) -> Option<LBrack> { support::token(&self.syntax) }
1090 pub fn r_brack(&self) -> Option<RBrack> { support::token(&self.syntax) } 1091 pub fn r_brack_token(&self) -> Option<RBrack> { support::token(&self.syntax) }
1091} 1092}
1092#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1093#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1093pub struct FieldExpr { 1094pub struct FieldExpr {
@@ -1107,7 +1108,7 @@ impl AstNode for FieldExpr {
1107impl ast::AttrsOwner for FieldExpr {} 1108impl ast::AttrsOwner for FieldExpr {}
1108impl FieldExpr { 1109impl FieldExpr {
1109 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1110 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1110 pub fn dot(&self) -> Option<Dot> { support::token(&self.syntax) } 1111 pub fn dot_token(&self) -> Option<Dot> { support::token(&self.syntax) }
1111 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 1112 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1112} 1113}
1113#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1114#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1128,8 +1129,8 @@ impl AstNode for AwaitExpr {
1128impl ast::AttrsOwner for AwaitExpr {} 1129impl ast::AttrsOwner for AwaitExpr {}
1129impl AwaitExpr { 1130impl AwaitExpr {
1130 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1131 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1131 pub fn dot(&self) -> Option<Dot> { support::token(&self.syntax) } 1132 pub fn dot_token(&self) -> Option<Dot> { support::token(&self.syntax) }
1132 pub fn await_kw(&self) -> Option<AwaitKw> { support::token(&self.syntax) } 1133 pub fn await_kw_token(&self) -> Option<AwaitKw> { support::token(&self.syntax) }
1133} 1134}
1134#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1135#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1135pub struct TryExpr { 1136pub struct TryExpr {
@@ -1148,7 +1149,7 @@ impl AstNode for TryExpr {
1148} 1149}
1149impl ast::AttrsOwner for TryExpr {} 1150impl ast::AttrsOwner for TryExpr {}
1150impl TryExpr { 1151impl TryExpr {
1151 pub fn try_kw(&self) -> Option<TryKw> { support::token(&self.syntax) } 1152 pub fn try_kw_token(&self) -> Option<TryKw> { support::token(&self.syntax) }
1152 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1153 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1153} 1154}
1154#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1155#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1169,7 +1170,7 @@ impl AstNode for CastExpr {
1169impl ast::AttrsOwner for CastExpr {} 1170impl ast::AttrsOwner for CastExpr {}
1170impl CastExpr { 1171impl CastExpr {
1171 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1172 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1172 pub fn as_kw(&self) -> Option<AsKw> { support::token(&self.syntax) } 1173 pub fn as_kw_token(&self) -> Option<AsKw> { support::token(&self.syntax) }
1173 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 1174 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
1174} 1175}
1175#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1176#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1189,9 +1190,9 @@ impl AstNode for RefExpr {
1189} 1190}
1190impl ast::AttrsOwner for RefExpr {} 1191impl ast::AttrsOwner for RefExpr {}
1191impl RefExpr { 1192impl RefExpr {
1192 pub fn amp(&self) -> Option<Amp> { support::token(&self.syntax) } 1193 pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) }
1193 pub fn raw_kw(&self) -> Option<RawKw> { support::token(&self.syntax) } 1194 pub fn raw_kw_token(&self) -> Option<RawKw> { support::token(&self.syntax) }
1194 pub fn mut_kw(&self) -> Option<MutKw> { support::token(&self.syntax) } 1195 pub fn mut_kw_token(&self) -> Option<MutKw> { support::token(&self.syntax) }
1195 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1196 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1196} 1197}
1197#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1198#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1211,7 +1212,7 @@ impl AstNode for PrefixExpr {
1211} 1212}
1212impl ast::AttrsOwner for PrefixExpr {} 1213impl ast::AttrsOwner for PrefixExpr {}
1213impl PrefixExpr { 1214impl PrefixExpr {
1214 pub fn prefix_op(&self) -> Option<PrefixOp> { support::token(&self.syntax) } 1215 pub fn prefix_op_token(&self) -> Option<PrefixOp> { support::token(&self.syntax) }
1215 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1216 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1216} 1217}
1217#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1218#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1231,7 +1232,7 @@ impl AstNode for BoxExpr {
1231} 1232}
1232impl ast::AttrsOwner for BoxExpr {} 1233impl ast::AttrsOwner for BoxExpr {}
1233impl BoxExpr { 1234impl BoxExpr {
1234 pub fn box_kw(&self) -> Option<BoxKw> { support::token(&self.syntax) } 1235 pub fn box_kw_token(&self) -> Option<BoxKw> { support::token(&self.syntax) }
1235 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1236 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1236} 1237}
1237#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1238#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1251,7 +1252,7 @@ impl AstNode for RangeExpr {
1251} 1252}
1252impl ast::AttrsOwner for RangeExpr {} 1253impl ast::AttrsOwner for RangeExpr {}
1253impl RangeExpr { 1254impl RangeExpr {
1254 pub fn range_op(&self) -> Option<RangeOp> { support::token(&self.syntax) } 1255 pub fn range_op_token(&self) -> Option<RangeOp> { support::token(&self.syntax) }
1255} 1256}
1256#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1257#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1257pub struct BinExpr { 1258pub struct BinExpr {
@@ -1270,7 +1271,7 @@ impl AstNode for BinExpr {
1270} 1271}
1271impl ast::AttrsOwner for BinExpr {} 1272impl ast::AttrsOwner for BinExpr {}
1272impl BinExpr { 1273impl BinExpr {
1273 pub fn bin_op(&self) -> Option<BinOp> { support::token(&self.syntax) } 1274 pub fn bin_op_token(&self) -> Option<BinOp> { support::token(&self.syntax) }
1274} 1275}
1275#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1276#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1276pub struct Literal { 1277pub struct Literal {
@@ -1288,7 +1289,7 @@ impl AstNode for Literal {
1288 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1289 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1289} 1290}
1290impl Literal { 1291impl Literal {
1291 pub fn literal_token(&self) -> Option<LiteralToken> { support::token(&self.syntax) } 1292 pub fn literal_token_token(&self) -> Option<LiteralToken> { support::token(&self.syntax) }
1292} 1293}
1293#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1294#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1294pub struct MatchExpr { 1295pub struct MatchExpr {
@@ -1307,7 +1308,7 @@ impl AstNode for MatchExpr {
1307} 1308}
1308impl ast::AttrsOwner for MatchExpr {} 1309impl ast::AttrsOwner for MatchExpr {}
1309impl MatchExpr { 1310impl MatchExpr {
1310 pub fn match_kw(&self) -> Option<MatchKw> { support::token(&self.syntax) } 1311 pub fn match_kw_token(&self) -> Option<MatchKw> { support::token(&self.syntax) }
1311 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1312 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1312 pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) } 1313 pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) }
1313} 1314}
@@ -1328,9 +1329,9 @@ impl AstNode for MatchArmList {
1328} 1329}
1329impl ast::AttrsOwner for MatchArmList {} 1330impl ast::AttrsOwner for MatchArmList {}
1330impl MatchArmList { 1331impl MatchArmList {
1331 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) } 1332 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) }
1332 pub fn arms(&self) -> AstChildren<MatchArm> { support::children(&self.syntax) } 1333 pub fn arms(&self) -> AstChildren<MatchArm> { support::children(&self.syntax) }
1333 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) } 1334 pub fn r_curly_token(&self) -> Option<RCurly> { support::token(&self.syntax) }
1334} 1335}
1335#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1336#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1336pub struct MatchArm { 1337pub struct MatchArm {
@@ -1351,7 +1352,7 @@ impl ast::AttrsOwner for MatchArm {}
1351impl MatchArm { 1352impl MatchArm {
1352 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1353 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1353 pub fn guard(&self) -> Option<MatchGuard> { support::child(&self.syntax) } 1354 pub fn guard(&self) -> Option<MatchGuard> { support::child(&self.syntax) }
1354 pub fn fat_arrow(&self) -> Option<FatArrow> { support::token(&self.syntax) } 1355 pub fn fat_arrow_token(&self) -> Option<FatArrow> { support::token(&self.syntax) }
1355 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1356 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1356} 1357}
1357#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1358#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1370,7 +1371,7 @@ impl AstNode for MatchGuard {
1370 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1371 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1371} 1372}
1372impl MatchGuard { 1373impl MatchGuard {
1373 pub fn if_kw(&self) -> Option<IfKw> { support::token(&self.syntax) } 1374 pub fn if_kw_token(&self) -> Option<IfKw> { support::token(&self.syntax) }
1374 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1375 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1375} 1376}
1376#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1377#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1408,11 +1409,11 @@ impl AstNode for RecordFieldList {
1408 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1409 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1409} 1410}
1410impl RecordFieldList { 1411impl RecordFieldList {
1411 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) } 1412 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) }
1412 pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) } 1413 pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) }
1413 pub fn dotdot(&self) -> Option<Dotdot> { support::token(&self.syntax) } 1414 pub fn dotdot_token(&self) -> Option<Dotdot> { support::token(&self.syntax) }
1414 pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) } 1415 pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) }
1415 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) } 1416 pub fn r_curly_token(&self) -> Option<RCurly> { support::token(&self.syntax) }
1416} 1417}
1417#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1418#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1418pub struct RecordField { 1419pub struct RecordField {
@@ -1432,7 +1433,7 @@ impl AstNode for RecordField {
1432impl ast::AttrsOwner for RecordField {} 1433impl ast::AttrsOwner for RecordField {}
1433impl RecordField { 1434impl RecordField {
1434 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 1435 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1435 pub fn colon(&self) -> Option<Colon> { support::token(&self.syntax) } 1436 pub fn colon_token(&self) -> Option<Colon> { support::token(&self.syntax) }
1436 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 1437 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1437} 1438}
1438#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1439#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1469,9 +1470,9 @@ impl AstNode for ParenPat {
1469 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1470 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1470} 1471}
1471impl ParenPat { 1472impl ParenPat {
1472 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) } 1473 pub fn l_paren_token(&self) -> Option<LParen> { support::token(&self.syntax) }
1473 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1474 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1474 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) } 1475 pub fn r_paren_token(&self) -> Option<RParen> { support::token(&self.syntax) }
1475} 1476}
1476#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1477#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1477pub struct RefPat { 1478pub struct RefPat {
@@ -1489,8 +1490,8 @@ impl AstNode for RefPat {
1489 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1490 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1490} 1491}
1491impl RefPat { 1492impl RefPat {
1492 pub fn amp(&self) -> Option<Amp> { support::token(&self.syntax) } 1493 pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) }
1493 pub fn mut_kw(&self) -> Option<MutKw> { support::token(&self.syntax) } 1494 pub fn mut_kw_token(&self) -> Option<MutKw> { support::token(&self.syntax) }
1494 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1495 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1495} 1496}
1496#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1497#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1509,7 +1510,7 @@ impl AstNode for BoxPat {
1509 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1510 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1510} 1511}
1511impl BoxPat { 1512impl BoxPat {
1512 pub fn box_kw(&self) -> Option<BoxKw> { support::token(&self.syntax) } 1513 pub fn box_kw_token(&self) -> Option<BoxKw> { support::token(&self.syntax) }
1513 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1514 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1514} 1515}
1515#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1516#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1530,8 +1531,9 @@ impl AstNode for BindPat {
1530impl ast::AttrsOwner for BindPat {} 1531impl ast::AttrsOwner for BindPat {}
1531impl ast::NameOwner for BindPat {} 1532impl ast::NameOwner for BindPat {}
1532impl BindPat { 1533impl BindPat {
1533 pub fn ref_kw(&self) -> Option<RefKw> { support::token(&self.syntax) } 1534 pub fn ref_kw_token(&self) -> Option<RefKw> { support::token(&self.syntax) }
1534 pub fn mut_kw(&self) -> Option<MutKw> { support::token(&self.syntax) } 1535 pub fn mut_kw_token(&self) -> Option<MutKw> { support::token(&self.syntax) }
1536 pub fn at_token(&self) -> Option<At> { support::token(&self.syntax) }
1535 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1537 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1536} 1538}
1537#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1539#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1550,7 +1552,7 @@ impl AstNode for PlaceholderPat {
1550 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1552 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1551} 1553}
1552impl PlaceholderPat { 1554impl PlaceholderPat {
1553 pub fn underscore(&self) -> Option<Underscore> { support::token(&self.syntax) } 1555 pub fn underscore_token(&self) -> Option<Underscore> { support::token(&self.syntax) }
1554} 1556}
1555#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1557#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1556pub struct DotDotPat { 1558pub struct DotDotPat {
@@ -1568,7 +1570,7 @@ impl AstNode for DotDotPat {
1568 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1570 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1569} 1571}
1570impl DotDotPat { 1572impl DotDotPat {
1571 pub fn dotdot(&self) -> Option<Dotdot> { support::token(&self.syntax) } 1573 pub fn dotdot_token(&self) -> Option<Dotdot> { support::token(&self.syntax) }
1572} 1574}
1573#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1575#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1574pub struct PathPat { 1576pub struct PathPat {
@@ -1604,9 +1606,9 @@ impl AstNode for SlicePat {
1604 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1606 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1605} 1607}
1606impl SlicePat { 1608impl SlicePat {
1607 pub fn l_brack(&self) -> Option<LBrack> { support::token(&self.syntax) } 1609 pub fn l_brack_token(&self) -> Option<LBrack> { support::token(&self.syntax) }
1608 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) } 1610 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1609 pub fn r_brack(&self) -> Option<RBrack> { support::token(&self.syntax) } 1611 pub fn r_brack_token(&self) -> Option<RBrack> { support::token(&self.syntax) }
1610} 1612}
1611#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1613#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1612pub struct RangePat { 1614pub struct RangePat {
@@ -1624,7 +1626,7 @@ impl AstNode for RangePat {
1624 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1626 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1625} 1627}
1626impl RangePat { 1628impl RangePat {
1627 pub fn range_separator(&self) -> Option<RangeSeparator> { support::token(&self.syntax) } 1629 pub fn range_separator_token(&self) -> Option<RangeSeparator> { support::token(&self.syntax) }
1628} 1630}
1629#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1631#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1630pub struct LiteralPat { 1632pub struct LiteralPat {
@@ -1699,14 +1701,14 @@ impl AstNode for RecordFieldPatList {
1699 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1701 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1700} 1702}
1701impl RecordFieldPatList { 1703impl RecordFieldPatList {
1702 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) } 1704 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) }
1703 pub fn pats(&self) -> AstChildren<RecordInnerPat> { support::children(&self.syntax) } 1705 pub fn pats(&self) -> AstChildren<RecordInnerPat> { support::children(&self.syntax) }
1704 pub fn record_field_pats(&self) -> AstChildren<RecordFieldPat> { 1706 pub fn record_field_pats(&self) -> AstChildren<RecordFieldPat> {
1705 support::children(&self.syntax) 1707 support::children(&self.syntax)
1706 } 1708 }
1707 pub fn bind_pats(&self) -> AstChildren<BindPat> { support::children(&self.syntax) } 1709 pub fn bind_pats(&self) -> AstChildren<BindPat> { support::children(&self.syntax) }
1708 pub fn dotdot(&self) -> Option<Dotdot> { support::token(&self.syntax) } 1710 pub fn dotdot_token(&self) -> Option<Dotdot> { support::token(&self.syntax) }
1709 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) } 1711 pub fn r_curly_token(&self) -> Option<RCurly> { support::token(&self.syntax) }
1710} 1712}
1711#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1713#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1712pub struct RecordFieldPat { 1714pub struct RecordFieldPat {
@@ -1726,7 +1728,7 @@ impl AstNode for RecordFieldPat {
1726impl ast::AttrsOwner for RecordFieldPat {} 1728impl ast::AttrsOwner for RecordFieldPat {}
1727impl ast::NameOwner for RecordFieldPat {} 1729impl ast::NameOwner for RecordFieldPat {}
1728impl RecordFieldPat { 1730impl RecordFieldPat {
1729 pub fn colon(&self) -> Option<Colon> { support::token(&self.syntax) } 1731 pub fn colon_token(&self) -> Option<Colon> { support::token(&self.syntax) }
1730 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1732 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1731} 1733}
1732#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1734#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1746,9 +1748,9 @@ impl AstNode for TupleStructPat {
1746} 1748}
1747impl TupleStructPat { 1749impl TupleStructPat {
1748 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 1750 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1749 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) } 1751 pub fn l_paren_token(&self) -> Option<LParen> { support::token(&self.syntax) }
1750 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) } 1752 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1751 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) } 1753 pub fn r_paren_token(&self) -> Option<RParen> { support::token(&self.syntax) }
1752} 1754}
1753#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1755#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1754pub struct TuplePat { 1756pub struct TuplePat {
@@ -1766,9 +1768,9 @@ impl AstNode for TuplePat {
1766 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1768 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1767} 1769}
1768impl TuplePat { 1770impl TuplePat {
1769 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) } 1771 pub fn l_paren_token(&self) -> Option<LParen> { support::token(&self.syntax) }
1770 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) } 1772 pub fn args(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1771 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) } 1773 pub fn r_paren_token(&self) -> Option<RParen> { support::token(&self.syntax) }
1772} 1774}
1773#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1775#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1774pub struct Visibility { 1776pub struct Visibility {
@@ -1786,10 +1788,10 @@ impl AstNode for Visibility {
1786 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1788 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1787} 1789}
1788impl Visibility { 1790impl Visibility {
1789 pub fn pub_kw(&self) -> Option<PubKw> { support::token(&self.syntax) } 1791 pub fn pub_kw_token(&self) -> Option<PubKw> { support::token(&self.syntax) }
1790 pub fn super_kw(&self) -> Option<SuperKw> { support::token(&self.syntax) } 1792 pub fn super_kw_token(&self) -> Option<SuperKw> { support::token(&self.syntax) }
1791 pub fn self_kw(&self) -> Option<SelfKw> { support::token(&self.syntax) } 1793 pub fn self_kw_token(&self) -> Option<SelfKw> { support::token(&self.syntax) }
1792 pub fn crate_kw(&self) -> Option<CrateKw> { support::token(&self.syntax) } 1794 pub fn crate_kw_token(&self) -> Option<CrateKw> { support::token(&self.syntax) }
1793} 1795}
1794#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1796#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1795pub struct Name { 1797pub struct Name {
@@ -1807,7 +1809,7 @@ impl AstNode for Name {
1807 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1809 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1808} 1810}
1809impl Name { 1811impl Name {
1810 pub fn ident(&self) -> Option<Ident> { support::token(&self.syntax) } 1812 pub fn ident_token(&self) -> Option<Ident> { support::token(&self.syntax) }
1811} 1813}
1812#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1814#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1813pub struct NameRef { 1815pub struct NameRef {
@@ -1825,7 +1827,7 @@ impl AstNode for NameRef {
1825 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1827 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1826} 1828}
1827impl NameRef { 1829impl NameRef {
1828 pub fn name_ref_token(&self) -> Option<NameRefToken> { support::token(&self.syntax) } 1830 pub fn name_ref_token_token(&self) -> Option<NameRefToken> { support::token(&self.syntax) }
1829} 1831}
1830#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1832#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1831pub struct MacroCall { 1833pub struct MacroCall {
@@ -1847,9 +1849,9 @@ impl ast::AttrsOwner for MacroCall {}
1847impl ast::DocCommentsOwner for MacroCall {} 1849impl ast::DocCommentsOwner for MacroCall {}
1848impl MacroCall { 1850impl MacroCall {
1849 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 1851 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1850 pub fn excl(&self) -> Option<Excl> { support::token(&self.syntax) } 1852 pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) }
1851 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) } 1853 pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
1852 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) } 1854 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
1853} 1855}
1854#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1856#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1855pub struct Attr { 1857pub struct Attr {
@@ -1867,13 +1869,13 @@ impl AstNode for Attr {
1867 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1869 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1868} 1870}
1869impl Attr { 1871impl Attr {
1870 pub fn pound(&self) -> Option<Pound> { support::token(&self.syntax) } 1872 pub fn pound_token(&self) -> Option<Pound> { support::token(&self.syntax) }
1871 pub fn excl(&self) -> Option<Excl> { support::token(&self.syntax) } 1873 pub fn excl_token(&self) -> Option<Excl> { support::token(&self.syntax) }
1872 pub fn l_brack(&self) -> Option<LBrack> { support::token(&self.syntax) } 1874 pub fn l_brack_token(&self) -> Option<LBrack> { support::token(&self.syntax) }
1873 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 1875 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1874 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) } 1876 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
1875 pub fn input(&self) -> Option<AttrInput> { support::child(&self.syntax) } 1877 pub fn input(&self) -> Option<AttrInput> { support::child(&self.syntax) }
1876 pub fn r_brack(&self) -> Option<RBrack> { support::token(&self.syntax) } 1878 pub fn r_brack_token(&self) -> Option<RBrack> { support::token(&self.syntax) }
1877} 1879}
1878#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1880#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1879pub struct TokenTree { 1881pub struct TokenTree {
@@ -1907,12 +1909,12 @@ impl AstNode for TypeParamList {
1907 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1909 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1908} 1910}
1909impl TypeParamList { 1911impl TypeParamList {
1910 pub fn l_angle(&self) -> Option<LAngle> { support::token(&self.syntax) } 1912 pub fn l_angle_token(&self) -> Option<LAngle> { support::token(&self.syntax) }
1911 pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) } 1913 pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) }
1912 pub fn type_params(&self) -> AstChildren<TypeParam> { support::children(&self.syntax) } 1914 pub fn type_params(&self) -> AstChildren<TypeParam> { support::children(&self.syntax) }
1913 pub fn lifetime_params(&self) -> AstChildren<LifetimeParam> { support::children(&self.syntax) } 1915 pub fn lifetime_params(&self) -> AstChildren<LifetimeParam> { support::children(&self.syntax) }
1914 pub fn const_params(&self) -> AstChildren<ConstParam> { support::children(&self.syntax) } 1916 pub fn const_params(&self) -> AstChildren<ConstParam> { support::children(&self.syntax) }
1915 pub fn r_angle(&self) -> Option<RAngle> { support::token(&self.syntax) } 1917 pub fn r_angle_token(&self) -> Option<RAngle> { support::token(&self.syntax) }
1916} 1918}
1917#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1919#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1918pub struct TypeParam { 1920pub struct TypeParam {
@@ -1933,7 +1935,7 @@ impl ast::NameOwner for TypeParam {}
1933impl ast::AttrsOwner for TypeParam {} 1935impl ast::AttrsOwner for TypeParam {}
1934impl ast::TypeBoundsOwner for TypeParam {} 1936impl ast::TypeBoundsOwner for TypeParam {}
1935impl TypeParam { 1937impl TypeParam {
1936 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) } 1938 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
1937 pub fn default_type(&self) -> Option<TypeRef> { support::child(&self.syntax) } 1939 pub fn default_type(&self) -> Option<TypeRef> { support::child(&self.syntax) }
1938} 1940}
1939#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1941#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1955,7 +1957,7 @@ impl ast::NameOwner for ConstParam {}
1955impl ast::AttrsOwner for ConstParam {} 1957impl ast::AttrsOwner for ConstParam {}
1956impl ast::TypeAscriptionOwner for ConstParam {} 1958impl ast::TypeAscriptionOwner for ConstParam {}
1957impl ConstParam { 1959impl ConstParam {
1958 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) } 1960 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
1959 pub fn default_val(&self) -> Option<Expr> { support::child(&self.syntax) } 1961 pub fn default_val(&self) -> Option<Expr> { support::child(&self.syntax) }
1960} 1962}
1961#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1963#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1975,7 +1977,7 @@ impl AstNode for LifetimeParam {
1975} 1977}
1976impl ast::AttrsOwner for LifetimeParam {} 1978impl ast::AttrsOwner for LifetimeParam {}
1977impl LifetimeParam { 1979impl LifetimeParam {
1978 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) } 1980 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
1979} 1981}
1980#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1982#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1981pub struct TypeBound { 1983pub struct TypeBound {
@@ -1993,8 +1995,8 @@ impl AstNode for TypeBound {
1993 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1995 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1994} 1996}
1995impl TypeBound { 1997impl TypeBound {
1996 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) } 1998 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
1997 pub fn const_kw(&self) -> Option<ConstKw> { support::token(&self.syntax) } 1999 pub fn const_kw_token(&self) -> Option<ConstKw> { support::token(&self.syntax) }
1998 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 2000 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
1999} 2001}
2000#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2002#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2032,7 +2034,7 @@ impl AstNode for WherePred {
2032} 2034}
2033impl ast::TypeBoundsOwner for WherePred {} 2035impl ast::TypeBoundsOwner for WherePred {}
2034impl WherePred { 2036impl WherePred {
2035 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) } 2037 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
2036 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 2038 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
2037} 2039}
2038#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2040#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2051,7 +2053,7 @@ impl AstNode for WhereClause {
2051 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2053 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2052} 2054}
2053impl WhereClause { 2055impl WhereClause {
2054 pub fn where_kw(&self) -> Option<WhereKw> { support::token(&self.syntax) } 2056 pub fn where_kw_token(&self) -> Option<WhereKw> { support::token(&self.syntax) }
2055 pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) } 2057 pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) }
2056} 2058}
2057#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2059#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2070,7 +2072,7 @@ impl AstNode for Abi {
2070 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2072 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2071} 2073}
2072impl Abi { 2074impl Abi {
2073 pub fn string(&self) -> Option<String> { support::token(&self.syntax) } 2075 pub fn string_token(&self) -> Option<String> { support::token(&self.syntax) }
2074} 2076}
2075#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2077#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2076pub struct ExprStmt { 2078pub struct ExprStmt {
@@ -2090,7 +2092,7 @@ impl AstNode for ExprStmt {
2090impl ast::AttrsOwner for ExprStmt {} 2092impl ast::AttrsOwner for ExprStmt {}
2091impl ExprStmt { 2093impl ExprStmt {
2092 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 2094 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2093 pub fn semi(&self) -> Option<Semi> { support::token(&self.syntax) } 2095 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
2094} 2096}
2095#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2097#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2096pub struct LetStmt { 2098pub struct LetStmt {
@@ -2110,10 +2112,11 @@ impl AstNode for LetStmt {
2110impl ast::AttrsOwner for LetStmt {} 2112impl ast::AttrsOwner for LetStmt {}
2111impl ast::TypeAscriptionOwner for LetStmt {} 2113impl ast::TypeAscriptionOwner for LetStmt {}
2112impl LetStmt { 2114impl LetStmt {
2113 pub fn let_kw(&self) -> Option<LetKw> { support::token(&self.syntax) } 2115 pub fn let_kw_token(&self) -> Option<LetKw> { support::token(&self.syntax) }
2114 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 2116 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2115 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) } 2117 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
2116 pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) } 2118 pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) }
2119 pub fn semi_token(&self) -> Option<Semi> { support::token(&self.syntax) }
2117} 2120}
2118#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2121#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2119pub struct Condition { 2122pub struct Condition {
@@ -2131,9 +2134,9 @@ impl AstNode for Condition {
2131 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2134 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2132} 2135}
2133impl Condition { 2136impl Condition {
2134 pub fn let_kw(&self) -> Option<LetKw> { support::token(&self.syntax) } 2137 pub fn let_kw_token(&self) -> Option<LetKw> { support::token(&self.syntax) }
2135 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 2138 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2136 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) } 2139 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
2137 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 2140 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2138} 2141}
2139#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2142#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2154,10 +2157,10 @@ impl AstNode for Block {
2154impl ast::AttrsOwner for Block {} 2157impl ast::AttrsOwner for Block {}
2155impl ast::ModuleItemOwner for Block {} 2158impl ast::ModuleItemOwner for Block {}
2156impl Block { 2159impl Block {
2157 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) } 2160 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) }
2158 pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) } 2161 pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
2159 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 2162 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2160 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) } 2163 pub fn r_curly_token(&self) -> Option<RCurly> { support::token(&self.syntax) }
2161} 2164}
2162#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2165#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2163pub struct ParamList { 2166pub struct ParamList {
@@ -2175,10 +2178,10 @@ impl AstNode for ParamList {
2175 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2178 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2176} 2179}
2177impl ParamList { 2180impl ParamList {
2178 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) } 2181 pub fn l_paren_token(&self) -> Option<LParen> { support::token(&self.syntax) }
2179 pub fn self_param(&self) -> Option<SelfParam> { support::child(&self.syntax) } 2182 pub fn self_param(&self) -> Option<SelfParam> { support::child(&self.syntax) }
2180 pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) } 2183 pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) }
2181 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) } 2184 pub fn r_paren_token(&self) -> Option<RParen> { support::token(&self.syntax) }
2182} 2185}
2183#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2186#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2184pub struct SelfParam { 2187pub struct SelfParam {
@@ -2198,9 +2201,9 @@ impl AstNode for SelfParam {
2198impl ast::TypeAscriptionOwner for SelfParam {} 2201impl ast::TypeAscriptionOwner for SelfParam {}
2199impl ast::AttrsOwner for SelfParam {} 2202impl ast::AttrsOwner for SelfParam {}
2200impl SelfParam { 2203impl SelfParam {
2201 pub fn amp(&self) -> Option<Amp> { support::token(&self.syntax) } 2204 pub fn amp_token(&self) -> Option<Amp> { support::token(&self.syntax) }
2202 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) } 2205 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
2203 pub fn self_kw(&self) -> Option<SelfKw> { support::token(&self.syntax) } 2206 pub fn self_kw_token(&self) -> Option<SelfKw> { support::token(&self.syntax) }
2204} 2207}
2205#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2208#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2206pub struct Param { 2209pub struct Param {
@@ -2221,7 +2224,7 @@ impl ast::TypeAscriptionOwner for Param {}
2221impl ast::AttrsOwner for Param {} 2224impl ast::AttrsOwner for Param {}
2222impl Param { 2225impl Param {
2223 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 2226 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
2224 pub fn dotdotdot(&self) -> Option<Dotdotdot> { support::token(&self.syntax) } 2227 pub fn dotdotdot_token(&self) -> Option<Dotdotdot> { support::token(&self.syntax) }
2225} 2228}
2226#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2229#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2227pub struct UseItem { 2230pub struct UseItem {
@@ -2241,7 +2244,7 @@ impl AstNode for UseItem {
2241impl ast::AttrsOwner for UseItem {} 2244impl ast::AttrsOwner for UseItem {}
2242impl ast::VisibilityOwner for UseItem {} 2245impl ast::VisibilityOwner for UseItem {}
2243impl UseItem { 2246impl UseItem {
2244 pub fn use_kw(&self) -> Option<UseKw> { support::token(&self.syntax) } 2247 pub fn use_kw_token(&self) -> Option<UseKw> { support::token(&self.syntax) }
2245 pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) } 2248 pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) }
2246} 2249}
2247#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2250#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2261,7 +2264,7 @@ impl AstNode for UseTree {
2261} 2264}
2262impl UseTree { 2265impl UseTree {
2263 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 2266 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
2264 pub fn star(&self) -> Option<Star> { support::token(&self.syntax) } 2267 pub fn star_token(&self) -> Option<Star> { support::token(&self.syntax) }
2265 pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) } 2268 pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) }
2266 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } 2269 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) }
2267} 2270}
@@ -2282,7 +2285,7 @@ impl AstNode for Alias {
2282} 2285}
2283impl ast::NameOwner for Alias {} 2286impl ast::NameOwner for Alias {}
2284impl Alias { 2287impl Alias {
2285 pub fn as_kw(&self) -> Option<AsKw> { support::token(&self.syntax) } 2288 pub fn as_kw_token(&self) -> Option<AsKw> { support::token(&self.syntax) }
2286} 2289}
2287#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2290#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2288pub struct UseTreeList { 2291pub struct UseTreeList {
@@ -2300,9 +2303,9 @@ impl AstNode for UseTreeList {
2300 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2303 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2301} 2304}
2302impl UseTreeList { 2305impl UseTreeList {
2303 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) } 2306 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) }
2304 pub fn use_trees(&self) -> AstChildren<UseTree> { support::children(&self.syntax) } 2307 pub fn use_trees(&self) -> AstChildren<UseTree> { support::children(&self.syntax) }
2305 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) } 2308 pub fn r_curly_token(&self) -> Option<RCurly> { support::token(&self.syntax) }
2306} 2309}
2307#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2310#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2308pub struct ExternCrateItem { 2311pub struct ExternCrateItem {
@@ -2322,8 +2325,8 @@ impl AstNode for ExternCrateItem {
2322impl ast::AttrsOwner for ExternCrateItem {} 2325impl ast::AttrsOwner for ExternCrateItem {}
2323impl ast::VisibilityOwner for ExternCrateItem {} 2326impl ast::VisibilityOwner for ExternCrateItem {}
2324impl ExternCrateItem { 2327impl ExternCrateItem {
2325 pub fn extern_kw(&self) -> Option<ExternKw> { support::token(&self.syntax) } 2328 pub fn extern_kw_token(&self) -> Option<ExternKw> { support::token(&self.syntax) }
2326 pub fn crate_kw(&self) -> Option<CrateKw> { support::token(&self.syntax) } 2329 pub fn crate_kw_token(&self) -> Option<CrateKw> { support::token(&self.syntax) }
2327 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 2330 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
2328 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) } 2331 pub fn alias(&self) -> Option<Alias> { support::child(&self.syntax) }
2329} 2332}
@@ -2343,9 +2346,9 @@ impl AstNode for ArgList {
2343 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2346 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2344} 2347}
2345impl ArgList { 2348impl ArgList {
2346 pub fn l_paren(&self) -> Option<LParen> { support::token(&self.syntax) } 2349 pub fn l_paren_token(&self) -> Option<LParen> { support::token(&self.syntax) }
2347 pub fn args(&self) -> AstChildren<Expr> { support::children(&self.syntax) } 2350 pub fn args(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
2348 pub fn r_paren(&self) -> Option<RParen> { support::token(&self.syntax) } 2351 pub fn r_paren_token(&self) -> Option<RParen> { support::token(&self.syntax) }
2349} 2352}
2350#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2353#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2351pub struct Path { 2354pub struct Path {
@@ -2382,14 +2385,14 @@ impl AstNode for PathSegment {
2382 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2385 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2383} 2386}
2384impl PathSegment { 2387impl PathSegment {
2385 pub fn coloncolon(&self) -> Option<Coloncolon> { support::token(&self.syntax) } 2388 pub fn coloncolon_token(&self) -> Option<Coloncolon> { support::token(&self.syntax) }
2386 pub fn l_angle(&self) -> Option<LAngle> { support::token(&self.syntax) } 2389 pub fn l_angle_token(&self) -> Option<LAngle> { support::token(&self.syntax) }
2387 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 2390 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
2388 pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) } 2391 pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) }
2389 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 2392 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
2390 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 2393 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
2391 pub fn path_type(&self) -> Option<PathType> { support::child(&self.syntax) } 2394 pub fn path_type(&self) -> Option<PathType> { support::child(&self.syntax) }
2392 pub fn r_angle(&self) -> Option<RAngle> { support::token(&self.syntax) } 2395 pub fn r_angle_token(&self) -> Option<RAngle> { support::token(&self.syntax) }
2393} 2396}
2394#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2397#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2395pub struct TypeArgList { 2398pub struct TypeArgList {
@@ -2407,14 +2410,14 @@ impl AstNode for TypeArgList {
2407 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2410 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2408} 2411}
2409impl TypeArgList { 2412impl TypeArgList {
2410 pub fn coloncolon(&self) -> Option<Coloncolon> { support::token(&self.syntax) } 2413 pub fn coloncolon_token(&self) -> Option<Coloncolon> { support::token(&self.syntax) }
2411 pub fn l_angle(&self) -> Option<LAngle> { support::token(&self.syntax) } 2414 pub fn l_angle_token(&self) -> Option<LAngle> { support::token(&self.syntax) }
2412 pub fn generic_args(&self) -> AstChildren<GenericArg> { support::children(&self.syntax) } 2415 pub fn generic_args(&self) -> AstChildren<GenericArg> { support::children(&self.syntax) }
2413 pub fn type_args(&self) -> AstChildren<TypeArg> { support::children(&self.syntax) } 2416 pub fn type_args(&self) -> AstChildren<TypeArg> { support::children(&self.syntax) }
2414 pub fn lifetime_args(&self) -> AstChildren<LifetimeArg> { support::children(&self.syntax) } 2417 pub fn lifetime_args(&self) -> AstChildren<LifetimeArg> { support::children(&self.syntax) }
2415 pub fn assoc_type_args(&self) -> AstChildren<AssocTypeArg> { support::children(&self.syntax) } 2418 pub fn assoc_type_args(&self) -> AstChildren<AssocTypeArg> { support::children(&self.syntax) }
2416 pub fn const_args(&self) -> AstChildren<ConstArg> { support::children(&self.syntax) } 2419 pub fn const_args(&self) -> AstChildren<ConstArg> { support::children(&self.syntax) }
2417 pub fn r_angle(&self) -> Option<RAngle> { support::token(&self.syntax) } 2420 pub fn r_angle_token(&self) -> Option<RAngle> { support::token(&self.syntax) }
2418} 2421}
2419#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2422#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2420pub struct TypeArg { 2423pub struct TypeArg {
@@ -2452,7 +2455,7 @@ impl AstNode for AssocTypeArg {
2452impl ast::TypeBoundsOwner for AssocTypeArg {} 2455impl ast::TypeBoundsOwner for AssocTypeArg {}
2453impl AssocTypeArg { 2456impl AssocTypeArg {
2454 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 2457 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
2455 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) } 2458 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
2456 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 2459 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
2457} 2460}
2458#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2461#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2471,7 +2474,7 @@ impl AstNode for LifetimeArg {
2471 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2474 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2472} 2475}
2473impl LifetimeArg { 2476impl LifetimeArg {
2474 pub fn lifetime(&self) -> Option<Lifetime> { support::token(&self.syntax) } 2477 pub fn lifetime_token(&self) -> Option<Lifetime> { support::token(&self.syntax) }
2475} 2478}
2476#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2479#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2477pub struct ConstArg { 2480pub struct ConstArg {
@@ -2490,7 +2493,7 @@ impl AstNode for ConstArg {
2490} 2493}
2491impl ConstArg { 2494impl ConstArg {
2492 pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) } 2495 pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) }
2493 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) } 2496 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
2494 pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) } 2497 pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
2495} 2498}
2496#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2499#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -2548,9 +2551,9 @@ impl AstNode for ExternItemList {
2548impl ast::FnDefOwner for ExternItemList {} 2551impl ast::FnDefOwner for ExternItemList {}
2549impl ast::ModuleItemOwner for ExternItemList {} 2552impl ast::ModuleItemOwner for ExternItemList {}
2550impl ExternItemList { 2553impl ExternItemList {
2551 pub fn l_curly(&self) -> Option<LCurly> { support::token(&self.syntax) } 2554 pub fn l_curly_token(&self) -> Option<LCurly> { support::token(&self.syntax) }
2552 pub fn extern_items(&self) -> AstChildren<ExternItem> { support::children(&self.syntax) } 2555 pub fn extern_items(&self) -> AstChildren<ExternItem> { support::children(&self.syntax) }
2553 pub fn r_curly(&self) -> Option<RCurly> { support::token(&self.syntax) } 2556 pub fn r_curly_token(&self) -> Option<RCurly> { support::token(&self.syntax) }
2554} 2557}
2555#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2558#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2556pub struct ExternBlock { 2559pub struct ExternBlock {
@@ -2588,7 +2591,7 @@ impl AstNode for MetaItem {
2588} 2591}
2589impl MetaItem { 2592impl MetaItem {
2590 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 2593 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
2591 pub fn eq(&self) -> Option<Eq> { support::token(&self.syntax) } 2594 pub fn eq_token(&self) -> Option<Eq> { support::token(&self.syntax) }
2592 pub fn attr_input(&self) -> Option<AttrInput> { support::child(&self.syntax) } 2595 pub fn attr_input(&self) -> Option<AttrInput> { support::child(&self.syntax) }
2593 pub fn nested_meta_items(&self) -> AstChildren<MetaItem> { support::children(&self.syntax) } 2596 pub fn nested_meta_items(&self) -> AstChildren<MetaItem> { support::children(&self.syntax) }
2594} 2597}