aboutsummaryrefslogtreecommitdiff
path: root/src/boot/fe/ast.ml
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-14 18:59:14 -0700
committerGraydon Hoare <[email protected]>2010-09-14 18:59:14 -0700
commitc61d021f6d97c101ff9d201e5bf8e78eda8c8a1b (patch)
treeb4092e0477f57fc36080ec148b8f759194f9bbee /src/boot/fe/ast.ml
parentBegin actually folding constant items into operands at site of use. (diff)
downloadrust-c61d021f6d97c101ff9d201e5bf8e78eda8c8a1b.tar.xz
rust-c61d021f6d97c101ff9d201e5bf8e78eda8c8a1b.zip
Commence moving pexp into ast, for eventual merger with expr.
Diffstat (limited to 'src/boot/fe/ast.ml')
-rw-r--r--src/boot/fe/ast.ml32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/boot/fe/ast.ml b/src/boot/fe/ast.ml
index b3a13df8..661bfe99 100644
--- a/src/boot/fe/ast.ml
+++ b/src/boot/fe/ast.ml
@@ -324,6 +324,37 @@ and expr =
| EXPR_unary of (unop * atom)
| EXPR_atom of atom
+(* FIXME: The redundancy between exprs and pexps is temporary.
+ * it'll just take a large-ish number of revisions to eliminate. *)
+
+and pexp' =
+ PEXP_call of (pexp * pexp array)
+ | PEXP_spawn of (domain * string * pexp)
+ | PEXP_bind of (pexp * pexp option array)
+ | PEXP_rec of ((ident * mutability * pexp) array * pexp option)
+ | PEXP_tup of ((mutability * pexp) array)
+ | PEXP_vec of mutability * (pexp array)
+ | PEXP_port
+ | PEXP_chan of (pexp option)
+ | PEXP_binop of (binop * pexp * pexp)
+ | PEXP_lazy_and of (pexp * pexp)
+ | PEXP_lazy_or of (pexp * pexp)
+ | PEXP_unop of (unop * pexp)
+ | PEXP_lval of plval
+ | PEXP_lit of lit
+ | PEXP_str of string
+ | PEXP_box of mutability * pexp
+ | PEXP_custom of name * (pexp array) * (string option)
+
+and plval =
+ PLVAL_ident of ident
+ | PLVAL_app of (ident * (ty array))
+ | PLVAL_ext_name of (pexp * name_component)
+ | PLVAL_ext_pexp of (pexp * pexp)
+ | PLVAL_ext_deref of pexp
+
+and pexp = pexp' Common.identified
+
and lit =
| LIT_nil
| LIT_bool of bool
@@ -375,7 +406,6 @@ and unop =
| UNOP_neg
| UNOP_cast of ty identified
-
and header_slots = ((slot identified) * ident) array
and header_tup = (slot identified) array