aboutsummaryrefslogtreecommitdiff
path: root/crates/libeditor
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-24 17:27:30 +0100
committerAleksey Kladov <[email protected]>2018-08-24 17:27:30 +0100
commit7edab6ae6b4c5d0c411e88f10e923b91dca31de3 (patch)
tree4c17856285f568c56adb7c02024ef80e821dd367 /crates/libeditor
parent4d293003964c8f9fabadb1ceb77eab29c0438de3 (diff)
nodes for blocks
Diffstat (limited to 'crates/libeditor')
-rw-r--r--crates/libeditor/src/symbols.rs2
-rw-r--r--crates/libeditor/tests/test.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/libeditor/src/symbols.rs b/crates/libeditor/src/symbols.rs
index b2b05bc6a..37cef6389 100644
--- a/crates/libeditor/src/symbols.rs
+++ b/crates/libeditor/src/symbols.rs
@@ -93,7 +93,7 @@ fn structure_node(node: SyntaxNodeRef) -> Option<StructureNode> {
93 visitor() 93 visitor()
94 .visit(decl::<ast::FnDef>) 94 .visit(decl::<ast::FnDef>)
95 .visit(decl::<ast::StructDef>) 95 .visit(decl::<ast::StructDef>)
96 .visit(decl::<ast::NamedField>) 96 .visit(decl::<ast::NamedFieldDef>)
97 .visit(decl::<ast::EnumDef>) 97 .visit(decl::<ast::EnumDef>)
98 .visit(decl::<ast::TraitDef>) 98 .visit(decl::<ast::TraitDef>)
99 .visit(decl::<ast::Module>) 99 .visit(decl::<ast::Module>)
diff --git a/crates/libeditor/tests/test.rs b/crates/libeditor/tests/test.rs
index 858c6c4a6..4f7c2e07a 100644
--- a/crates/libeditor/tests/test.rs
+++ b/crates/libeditor/tests/test.rs
@@ -104,7 +104,7 @@ impl fmt::Debug for E {}
104 let symbols = file_structure(&file); 104 let symbols = file_structure(&file);
105 assert_eq_dbg( 105 assert_eq_dbg(
106 r#"[StructureNode { parent: None, label: "Foo", navigation_range: [8; 11), node_range: [1; 26), kind: STRUCT_DEF }, 106 r#"[StructureNode { parent: None, label: "Foo", navigation_range: [8; 11), node_range: [1; 26), kind: STRUCT_DEF },
107 StructureNode { parent: Some(0), label: "x", navigation_range: [18; 19), node_range: [18; 24), kind: NAMED_FIELD }, 107 StructureNode { parent: Some(0), label: "x", navigation_range: [18; 19), node_range: [18; 24), kind: NAMED_FIELD_DEF },
108 StructureNode { parent: None, label: "m", navigation_range: [32; 33), node_range: [28; 53), kind: MODULE }, 108 StructureNode { parent: None, label: "m", navigation_range: [32; 33), node_range: [28; 53), kind: MODULE },
109 StructureNode { parent: Some(2), label: "bar", navigation_range: [43; 46), node_range: [40; 51), kind: FN_DEF }, 109 StructureNode { parent: Some(2), label: "bar", navigation_range: [43; 46), node_range: [40; 51), kind: FN_DEF },
110 StructureNode { parent: None, label: "E", navigation_range: [60; 61), node_range: [55; 75), kind: ENUM_DEF }, 110 StructureNode { parent: None, label: "E", navigation_range: [60; 61), node_range: [55; 75), kind: ENUM_DEF },