about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorBrian Anderson <andersrb@gmail.com>2011-03-06 16:17:12 -0500
committerGraydon Hoare <graydon@mozilla.com>2011-03-14 16:41:46 -0700
commit292dac644f3f8a84db9f97bf1978f9e9c56e7881 (patch)
tree7b5a0d6cb2a338dd52c2fd3473f6338bd42ff5e1 /src/comp
parent80e0ebaa86869b6c7063dde8316f98aa5f365316 (diff)
downloadrust-292dac644f3f8a84db9f97bf1978f9e9c56e7881.tar.gz
rust-292dac644f3f8a84db9f97bf1978f9e9c56e7881.zip
Parse receive expressions
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/front/ast.rs1
-rw-r--r--src/comp/front/parser.rs6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs
index 694ff44857b..edc9c4a25c0 100644
--- a/src/comp/front/ast.rs
+++ b/src/comp/front/ast.rs
@@ -245,6 +245,7 @@ tag expr_ {
     expr_port(ann);
     expr_chan(@expr, ann);
     expr_send(@expr /* TODO: @expr|is_lval */, @expr, ann);
+    expr_recv(@expr /* TODO: @expr|is_lval */, @expr, ann);
 }
 
 type lit = spanned[lit_];
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs
index 1f7d4686df4..64f954b89e2 100644
--- a/src/comp/front/parser.rs
+++ b/src/comp/front/parser.rs
@@ -1119,6 +1119,12 @@ impure fn parse_assign_expr(parser p) -> @ast.expr {
             ret @spanned(lo, rhs.span,
                          ast.expr_send(lhs, rhs, ast.ann_none));
         }
+        case (token.LARROW) {
+            p.bump();
+            auto rhs = parse_expr(p);
+            ret @spanned(lo, rhs.span,
+                         ast.expr_send(lhs, rhs, ast.ann_none));
+        }
         case (_) { /* fall through */ }
     }
     ret lhs;