nodes for blocks
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user