dead code
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
use crate::{ast, AstNode};
|
||||
|
||||
pub fn parse_expr_from_str(s: &str) -> Option<ast::Expr> {
|
||||
let s = s.trim();
|
||||
let file = ast::SourceFile::parse(&format!("const _: () = {};", s));
|
||||
let expr = file.syntax_node().descendants().find_map(ast::Expr::cast)?;
|
||||
if expr.syntax().text() != s {
|
||||
|
||||
Reference in New Issue
Block a user