aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorMarcus Klaas de Vries <[email protected]>2019-01-11 10:27:07 +0000
committerMarcus Klaas de Vries <[email protected]>2019-01-14 12:56:43 +0000
commit606d66a714bb8fe07f35a6af83d04ab576b9a0e1 (patch)
treedd69d9e6484d7a67d8545ef10ec736c24d90849e /crates/ra_hir
parent81bc8e4973fefd0ff31d08206c374fb58aa8b6e0 (diff)
Start moving literal interpretation to the AST (WIP)
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/expr.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs
index 52af2af45..3f2689781 100644
--- a/crates/ra_hir/src/expr.rs
+++ b/crates/ra_hir/src/expr.rs
@@ -649,10 +649,9 @@ impl ExprCollector {
649 let exprs = e.exprs().map(|expr| self.collect_expr(expr)).collect(); 649 let exprs = e.exprs().map(|expr| self.collect_expr(expr)).collect();
650 self.alloc_expr(Expr::Tuple { exprs }, syntax_ptr) 650 self.alloc_expr(Expr::Tuple { exprs }, syntax_ptr)
651 } 651 }
652 ast::ExprKind::Literal(e) => { 652 ast::ExprKind::LiteralExpr(e) => {
653 let child = e.syntax().children().next(); 653 if let Some(child) = e.literal() {
654 654 let c = child.syntax();
655 if let Some(c) = child {
656 let lit = match c.kind() { 655 let lit = match c.kind() {
657 SyntaxKind::INT_NUMBER => { 656 SyntaxKind::INT_NUMBER => {
658 let text = c.text().to_string(); 657 let text = c.text().to_string();