diff options
author | darksv <[email protected]> | 2018-09-10 19:14:09 +0100 |
---|---|---|
committer | darksv <[email protected]> | 2018-09-10 19:14:09 +0100 |
commit | 64d07c1bd475c4945db8d7cd1fa1a61e467b079b (patch) | |
tree | 3184113f1d146e887eae6d667ff9c16b2138160b /crates/libsyntax2/src/lib.rs | |
parent | 4f647096665b2ca3725ba1f7415a21fbc46044bb (diff) |
Implement reparsing for remaining blocks
Diffstat (limited to 'crates/libsyntax2/src/lib.rs')
-rw-r--r-- | crates/libsyntax2/src/lib.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/lib.rs b/crates/libsyntax2/src/lib.rs index d955c01e7..74e8e7338 100644 --- a/crates/libsyntax2/src/lib.rs +++ b/crates/libsyntax2/src/lib.rs | |||
@@ -144,6 +144,21 @@ fn find_reparsable_node(node: SyntaxNodeRef, range: TextRange) -> Option<(Syntax | |||
144 | let res = match node.kind() { | 144 | let res = match node.kind() { |
145 | BLOCK => grammar::block, | 145 | BLOCK => grammar::block, |
146 | NAMED_FIELD_DEF_LIST => grammar::named_field_def_list, | 146 | NAMED_FIELD_DEF_LIST => grammar::named_field_def_list, |
147 | NAMED_FIELD_LIST => grammar::named_field_list, | ||
148 | ENUM_VARIANT_LIST => grammar::enum_variant_list, | ||
149 | MATCH_ARM_LIST => grammar::match_arm_list, | ||
150 | USE_TREE_LIST => grammar::use_tree_list, | ||
151 | EXTERN_ITEM_LIST => grammar::extern_item_list, | ||
152 | TOKEN_TREE => grammar::token_tree, | ||
153 | ITEM_LIST => { | ||
154 | let parent = node.parent().unwrap(); | ||
155 | match parent.kind() { | ||
156 | IMPL_ITEM => grammar::impl_item_list, | ||
157 | TRAIT_DEF => grammar::trait_item_list, | ||
158 | MODULE => grammar::mod_item_list, | ||
159 | _ => return None, | ||
160 | } | ||
161 | }, | ||
147 | _ => return None, | 162 | _ => return None, |
148 | }; | 163 | }; |
149 | Some(res) | 164 | Some(res) |