diff options
author | Aleksey Kladov <[email protected]> | 2019-02-20 13:48:06 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-02-20 13:48:06 +0000 |
commit | 86a67dce25f11ba9803a5727f77c02fd1f49e2c0 (patch) | |
tree | d02a22f02908fd3c89e50845a06a89b997220fc2 /crates/ra_syntax | |
parent | 45fc91cc470fa91d5b8905fea2cab4d42bbe72b3 (diff) |
fix tests
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r-- | crates/ra_syntax/src/parsing/reparsing.rs | 8 | ||||
-rw-r--r-- | crates/ra_syntax/src/syntax_kinds.rs | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/parsing/reparsing.rs b/crates/ra_syntax/src/parsing/reparsing.rs index a88f53dae..edf3fa291 100644 --- a/crates/ra_syntax/src/parsing/reparsing.rs +++ b/crates/ra_syntax/src/parsing/reparsing.rs | |||
@@ -79,10 +79,12 @@ fn is_contextual_kw(text: &str) -> bool { | |||
79 | } | 79 | } |
80 | } | 80 | } |
81 | 81 | ||
82 | type ParseFn = fn(&mut Parser); | 82 | fn find_reparsable_node( |
83 | fn find_reparsable_node(node: &SyntaxNode, range: TextRange) -> Option<(&SyntaxNode, ParseFn)> { | 83 | node: &SyntaxNode, |
84 | range: TextRange, | ||
85 | ) -> Option<(&SyntaxNode, fn(&mut Parser))> { | ||
84 | let node = algo::find_covering_node(node, range); | 86 | let node = algo::find_covering_node(node, range); |
85 | node.ancestors().find_map(grammar::reparser).map(|r| (node, r)) | 87 | node.ancestors().find_map(|node| grammar::reparser(node).map(|r| (node, r))) |
86 | } | 88 | } |
87 | 89 | ||
88 | fn is_balanced(tokens: &[Token]) -> bool { | 90 | fn is_balanced(tokens: &[Token]) -> bool { |
diff --git a/crates/ra_syntax/src/syntax_kinds.rs b/crates/ra_syntax/src/syntax_kinds.rs index d53886676..c1118c5ab 100644 --- a/crates/ra_syntax/src/syntax_kinds.rs +++ b/crates/ra_syntax/src/syntax_kinds.rs | |||
@@ -1,8 +1,9 @@ | |||
1 | mod generated; | 1 | mod generated; |
2 | 2 | ||
3 | use crate::SyntaxKind::*; | ||
4 | use std::fmt; | 3 | use std::fmt; |
5 | 4 | ||
5 | use crate::SyntaxKind::*; | ||
6 | |||
6 | pub use self::generated::SyntaxKind; | 7 | pub use self::generated::SyntaxKind; |
7 | 8 | ||
8 | impl fmt::Debug for SyntaxKind { | 9 | impl fmt::Debug for SyntaxKind { |