aboutsummaryrefslogtreecommitdiff
path: root/src/boot/fe/pexp.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/fe/pexp.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/fe/pexp.ml')
-rw-r--r--src/boot/fe/pexp.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/boot/fe/pexp.ml b/src/boot/fe/pexp.ml
index f5704416..58a64474 100644
--- a/src/boot/fe/pexp.ml
+++ b/src/boot/fe/pexp.ml
@@ -1263,10 +1263,11 @@ and desugar_expr_init
aa arg_stmts stmts
-and atom_lval (ps:pstate) (at:Ast.atom) : Ast.lval =
+and atom_lval (_:pstate) (at:Ast.atom) : Ast.lval =
match at with
Ast.ATOM_lval lv -> lv
- | Ast.ATOM_literal _ -> raise (err "literal where lval expected" ps)
+ | Ast.ATOM_literal _
+ | Ast.ATOM_pexp _ -> bug () "Pexp.atom_lval on non-ATOM_lval"
;;