about summary refs log tree commit diff
path: root/src/boot/driver
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2010-09-15 16:10:08 -0700
committerGraydon Hoare <graydon@mozilla.com>2010-09-15 16:10:08 -0700
commit5c82cb42e797599036746461eddf2bec1685eaf3 (patch)
treef4a79464c688a7002c26620522d40b770bd63e04 /src/boot/driver
parent3350b17c60eec98264c62c3e12893d5ca8e00e7d (diff)
downloadrust-5c82cb42e797599036746461eddf2bec1685eaf3.tar.gz
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 1e4c28e834e..8f686522252 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 ce5a18fb9f0..f8e79fe2034 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;