aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me/trans.ml
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-15 16:10:08 -0700
committerGraydon Hoare <[email protected]>2010-09-15 16:10:08 -0700
commit5c82cb42e797599036746461eddf2bec1685eaf3 (patch)
treef4a79464c688a7002c26620522d40b770bd63e04 /src/boot/me/trans.ml
parentAdd pretty-printing for pexps. (diff)
downloadrust-5c82cb42e797599036746461eddf2bec1685eaf3.tar.xz
rust-5c82cb42e797599036746461eddf2bec1685eaf3.zip
Add Ast.ATOM_pexp and -pexp mode wherein pexps live beyond parsing, into later stages. Fixes to pexp pretty printer.
Diffstat (limited to 'src/boot/me/trans.ml')
-rw-r--r--src/boot/me/trans.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml
index 757b9ef7..8053c0f9 100644
--- a/src/boot/me/trans.ml
+++ b/src/boot/me/trans.ml
@@ -1031,6 +1031,9 @@ let trans_visitor
| Ast.ATOM_lval lv ->
trans_const_lval lv
+ | Ast.ATOM_pexp _ ->
+ unimpl None "constant-folding pexp atom"
+
and trans_const_expr
(expr:Ast.expr)
: (Ast.ty * const) =
@@ -1404,6 +1407,8 @@ let trans_visitor
Il.Cell (fst (deref_ty DEREF_none false cell ty))
| Ast.ATOM_literal lit -> trans_lit lit.node
+ | Ast.ATOM_pexp _ -> bug () "Trans.trans_atom on ATOM_pexp"
+
and fixup_to_ptr_operand
(imm_ok:bool)
@@ -3583,6 +3588,10 @@ let trans_visitor
dst_cell dst_ty
src_cell src_ty
+ | (_, Ast.EXPR_atom (Ast.ATOM_pexp _)) ->
+ bug () "Trans.trans_copy on ATOM_pexp"
+
+
and trans_init_direct_fn
(dst_cell:Il.cell)
(flv:Ast.lval)