aboutsummaryrefslogtreecommitdiff
path: root/src/boot/driver
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/driver
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/driver')
-rw-r--r--src/boot/driver/main.ml5
-rw-r--r--src/boot/driver/session.ml1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/boot/driver/main.ml b/src/boot/driver/main.ml
index 1e4c28e8..8f686522 100644
--- a/src/boot/driver/main.ml
+++ b/src/boot/driver/main.ml
@@ -24,6 +24,7 @@ let (sess:Session.sess) =
Session.sess_out = None;
Session.sess_library_mode = false;
Session.sess_alt_backend = false;
+ Session.sess_use_pexps = false;
(* FIXME (issue #69): need something fancier here for unix
* sub-flavours.
*)
@@ -214,6 +215,10 @@ let argspecs =
"report dependencies of input, then exit");
("-version", Arg.Unit (fun _ -> print_version()),
"print version information, then exit");
+
+ (flag (fun _ -> sess.Session.sess_use_pexps <- true)
+ "-pexp" "use pexp portion of AST");
+
] @ (Glue.alt_argspecs sess)
;;
diff --git a/src/boot/driver/session.ml b/src/boot/driver/session.ml
index ce5a18fb..f8e79fe2 100644
--- a/src/boot/driver/session.ml
+++ b/src/boot/driver/session.ml
@@ -13,6 +13,7 @@ type sess =
mutable sess_out: filename option;
mutable sess_library_mode: bool;
mutable sess_alt_backend: bool;
+ mutable sess_use_pexps: bool;
mutable sess_targ: target;
mutable sess_log_lex: bool;
mutable sess_log_parse: bool;