fix tests
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user