diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-02-17 13:45:27 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-17 13:45:27 +0000 |
commit | 4054525c418085db4ceb2df70475a1ac9c019aff (patch) | |
tree | 64adbc8c62df3a6ebbe8c1a799589a94ddfbf490 /crates/syntax/src/ast.rs | |
parent | 056601b41fbc5208cae5d996ec7fd18526d79e41 (diff) | |
parent | e1dbf43cf85f84c3a7e40f9731fc1f7ac96f8979 (diff) |
Merge #7699
7699: Implement ast::AstNode for NameLike and move it to node_ext r=matklad a=Veykril
With this `search`(and 2 other modules) don't necessarily go through 3 calls of `find_node_at_offset_with_descend` to find the correct node. Also makes the code that searches for NameLikes a bit easier on the eyes imo, though that can be fixed with just a helper function as well so its not that relevant.
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/syntax/src/ast.rs')
-rw-r--r-- | crates/syntax/src/ast.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/syntax/src/ast.rs b/crates/syntax/src/ast.rs index a25ff655e..72214a4f0 100644 --- a/crates/syntax/src/ast.rs +++ b/crates/syntax/src/ast.rs | |||
@@ -19,8 +19,8 @@ pub use self::{ | |||
19 | expr_ext::{ArrayExprKind, BinOp, Effect, ElseBranch, LiteralKind, PrefixOp, RangeOp}, | 19 | expr_ext::{ArrayExprKind, BinOp, Effect, ElseBranch, LiteralKind, PrefixOp, RangeOp}, |
20 | generated::{nodes::*, tokens::*}, | 20 | generated::{nodes::*, tokens::*}, |
21 | node_ext::{ | 21 | node_ext::{ |
22 | AttrKind, FieldKind, Macro, NameOrNameRef, PathSegmentKind, SelfParamKind, | 22 | AttrKind, FieldKind, Macro, NameLike, PathSegmentKind, SelfParamKind, SlicePatComponents, |
23 | SlicePatComponents, StructKind, TypeBoundKind, VisibilityKind, | 23 | StructKind, TypeBoundKind, VisibilityKind, |
24 | }, | 24 | }, |
25 | token_ext::*, | 25 | token_ext::*, |
26 | traits::*, | 26 | traits::*, |