PR#1898: add -nopromptcont option to suppress secondary prompts

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12085 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2012-01-27 12:48:15 +00:00
parent 8328795309
commit 3836d4086a
8 changed files with 17 additions and 0 deletions

View File

@ -169,6 +169,11 @@ let mk_noprompt f =
"-noprompt", Arg.Unit f, " Suppress all prompts"
;;
let mk_nopromptcont f =
"-nopromptcont", Arg.Unit f,
" Suppress prompts for continuation lines of multi-line inputs"
;;
let mk_nostdlib f =
"-nostdlib", Arg.Unit f,
" Do not add default directory to the list of include directories"
@ -450,6 +455,7 @@ module type Bytetop_options = sig
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _noprompt : unit -> unit
val _nopromptcont : unit -> unit
val _nostdlib : unit -> unit
val _principal : unit -> unit
val _rectypes : unit -> unit
@ -550,6 +556,7 @@ module type Opttop_options = sig
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _noprompt : unit -> unit
val _nopromptcont : unit -> unit
val _nostdlib : unit -> unit
val _principal : unit -> unit
val _rectypes : unit -> unit
@ -664,6 +671,7 @@ struct
mk_noassert F._noassert;
mk_nolabels F._nolabels;
mk_noprompt F._noprompt;
mk_nopromptcont F._nopromptcont;
mk_nostdlib F._nostdlib;
mk_principal F._principal;
mk_rectypes F._rectypes;
@ -769,6 +777,7 @@ module Make_opttop_options (F : Opttop_options) = struct
mk_noassert F._noassert;
mk_nolabels F._nolabels;
mk_noprompt F._noprompt;
mk_nopromptcont F._nopromptcont;
mk_nostdlib F._nostdlib;
mk_principal F._principal;
mk_rectypes F._rectypes;

View File

@ -80,6 +80,7 @@ module type Bytetop_options = sig
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _noprompt : unit -> unit
val _nopromptcont : unit -> unit
val _nostdlib : unit -> unit
val _principal : unit -> unit
val _rectypes : unit -> unit
@ -180,6 +181,7 @@ module type Opttop_options = sig
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _noprompt : unit -> unit
val _nopromptcont : unit -> unit
val _nostdlib : unit -> unit
val _principal : unit -> unit
val _rectypes : unit -> unit

View File

@ -363,6 +363,7 @@ let refill_lexbuf buffer len =
let prompt =
if !Clflags.noprompt then ""
else if !first_line then "# "
else if !Clflags.nopromptcont then ""
else if Lexer.in_comment () then "* "
else " "
in

View File

@ -74,6 +74,7 @@ module Options = Main_args.Make_opttop_options (struct
let _noassert = set noassert
let _nolabels = set classic
let _noprompt = set noprompt
let _nopromptcont = set nopromptcont
let _nostdlib = set no_std_include
let _principal = set principal
let _rectypes = set recursive_types

View File

@ -352,6 +352,7 @@ let refill_lexbuf buffer len =
let prompt =
if !Clflags.noprompt then ""
else if !first_line then "# "
else if !Clflags.nopromptcont then ""
else if Lexer.in_comment () then "* "
else " "
in

View File

@ -71,6 +71,7 @@ module Options = Main_args.Make_bytetop_options (struct
let _noassert = set noassert
let _nolabels = set classic
let _noprompt = set noprompt
let _nopromptcont = set nopromptcont
let _nostdlib = set no_std_include
let _principal = set principal
let _rectypes = set recursive_types

View File

@ -39,6 +39,7 @@ and use_vmthreads = ref false (* -vmthread *)
and noassert = ref false (* -noassert *)
and verbose = ref false (* -verbose *)
and noprompt = ref false (* -noprompt *)
and nopromptcont = ref false (* -nopromptcont *)
and init_file = ref (None : string option) (* -init *)
and use_prims = ref "" (* -use-prims ... *)
and use_runtime = ref "" (* -use-runtime ... *)

View File

@ -36,6 +36,7 @@ val use_vmthreads : bool ref
val noassert : bool ref
val verbose : bool ref
val noprompt : bool ref
val nopromptcont : bool ref
val init_file : string option ref
val use_prims : string ref
val use_runtime : string ref