last use of parse api in ssr
This commit is contained in:
parent
45bba40079
commit
f9e06e6524
@ -226,8 +226,8 @@ fn token_is_method_call_receiver(token: &SyntaxToken) -> bool {
|
||||
|
||||
fn parse_as_kind(code: &str, kind: SyntaxKind) -> Option<SyntaxNode> {
|
||||
if ast::Expr::can_cast(kind) {
|
||||
if let Ok(expr) = ast::Expr::parse(code) {
|
||||
return Some(expr.syntax().clone());
|
||||
if let Ok(expr) = fragments::expr(code) {
|
||||
return Some(expr);
|
||||
}
|
||||
}
|
||||
if ast::Item::can_cast(kind) {
|
||||
|
Loading…
Reference in New Issue
Block a user