mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
nodes for blocks
This commit is contained in:
parent
4d29300396
commit
7edab6ae6b
122 changed files with 1743 additions and 1535 deletions
|
@ -93,7 +93,7 @@ fn structure_node(node: SyntaxNodeRef) -> Option<StructureNode> {
|
|||
visitor()
|
||||
.visit(decl::<ast::FnDef>)
|
||||
.visit(decl::<ast::StructDef>)
|
||||
.visit(decl::<ast::NamedField>)
|
||||
.visit(decl::<ast::NamedFieldDef>)
|
||||
.visit(decl::<ast::EnumDef>)
|
||||
.visit(decl::<ast::TraitDef>)
|
||||
.visit(decl::<ast::Module>)
|
||||
|
|
|
@ -104,7 +104,7 @@ impl fmt::Debug for E {}
|
|||
let symbols = file_structure(&file);
|
||||
assert_eq_dbg(
|
||||
r#"[StructureNode { parent: None, label: "Foo", navigation_range: [8; 11), node_range: [1; 26), kind: STRUCT_DEF },
|
||||
StructureNode { parent: Some(0), label: "x", navigation_range: [18; 19), node_range: [18; 24), kind: NAMED_FIELD },
|
||||
StructureNode { parent: Some(0), label: "x", navigation_range: [18; 19), node_range: [18; 24), kind: NAMED_FIELD_DEF },
|
||||
StructureNode { parent: None, label: "m", navigation_range: [32; 33), node_range: [28; 53), kind: MODULE },
|
||||
StructureNode { parent: Some(2), label: "bar", navigation_range: [43; 46), node_range: [40; 51), kind: FN_DEF },
|
||||
StructureNode { parent: None, label: "E", navigation_range: [60; 61), node_range: [55; 75), kind: ENUM_DEF },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue