mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Start moving literal interpretation to the AST (WIP)
This commit is contained in:
parent
81bc8e4973
commit
606d66a714
4 changed files with 131 additions and 10 deletions
|
@ -649,10 +649,9 @@ impl ExprCollector {
|
|||
let exprs = e.exprs().map(|expr| self.collect_expr(expr)).collect();
|
||||
self.alloc_expr(Expr::Tuple { exprs }, syntax_ptr)
|
||||
}
|
||||
ast::ExprKind::Literal(e) => {
|
||||
let child = e.syntax().children().next();
|
||||
|
||||
if let Some(c) = child {
|
||||
ast::ExprKind::LiteralExpr(e) => {
|
||||
if let Some(child) = e.literal() {
|
||||
let c = child.syntax();
|
||||
let lit = match c.kind() {
|
||||
SyntaxKind::INT_NUMBER => {
|
||||
let text = c.text().to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue