mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
fix tests
This commit is contained in:
parent
45fc91cc47
commit
86a67dce25
3 changed files with 8 additions and 5 deletions
|
@ -79,10 +79,12 @@ fn is_contextual_kw(text: &str) -> bool {
|
|||
}
|
||||
}
|
||||
|
||||
type ParseFn = fn(&mut Parser);
|
||||
fn find_reparsable_node(node: &SyntaxNode, range: TextRange) -> Option<(&SyntaxNode, ParseFn)> {
|
||||
fn find_reparsable_node(
|
||||
node: &SyntaxNode,
|
||||
range: TextRange,
|
||||
) -> Option<(&SyntaxNode, fn(&mut Parser))> {
|
||||
let node = algo::find_covering_node(node, range);
|
||||
node.ancestors().find_map(grammar::reparser).map(|r| (node, r))
|
||||
node.ancestors().find_map(|node| grammar::reparser(node).map(|r| (node, r)))
|
||||
}
|
||||
|
||||
fn is_balanced(tokens: &[Token]) -> bool {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
mod generated;
|
||||
|
||||
use crate::SyntaxKind::*;
|
||||
use std::fmt;
|
||||
|
||||
use crate::SyntaxKind::*;
|
||||
|
||||
pub use self::generated::SyntaxKind;
|
||||
|
||||
impl fmt::Debug for SyntaxKind {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue