PR#1898: add -nopromptcont option to suppress secondary prompts
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12085 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
8328795309
commit
3836d4086a
|
@ -169,6 +169,11 @@ let mk_noprompt f =
|
||||||
"-noprompt", Arg.Unit f, " Suppress all prompts"
|
"-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 =
|
let mk_nostdlib f =
|
||||||
"-nostdlib", Arg.Unit f,
|
"-nostdlib", Arg.Unit f,
|
||||||
" Do not add default directory to the list of include directories"
|
" 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 _noassert : unit -> unit
|
||||||
val _nolabels : unit -> unit
|
val _nolabels : unit -> unit
|
||||||
val _noprompt : unit -> unit
|
val _noprompt : unit -> unit
|
||||||
|
val _nopromptcont : unit -> unit
|
||||||
val _nostdlib : unit -> unit
|
val _nostdlib : unit -> unit
|
||||||
val _principal : unit -> unit
|
val _principal : unit -> unit
|
||||||
val _rectypes : unit -> unit
|
val _rectypes : unit -> unit
|
||||||
|
@ -550,6 +556,7 @@ module type Opttop_options = sig
|
||||||
val _noassert : unit -> unit
|
val _noassert : unit -> unit
|
||||||
val _nolabels : unit -> unit
|
val _nolabels : unit -> unit
|
||||||
val _noprompt : unit -> unit
|
val _noprompt : unit -> unit
|
||||||
|
val _nopromptcont : unit -> unit
|
||||||
val _nostdlib : unit -> unit
|
val _nostdlib : unit -> unit
|
||||||
val _principal : unit -> unit
|
val _principal : unit -> unit
|
||||||
val _rectypes : unit -> unit
|
val _rectypes : unit -> unit
|
||||||
|
@ -664,6 +671,7 @@ struct
|
||||||
mk_noassert F._noassert;
|
mk_noassert F._noassert;
|
||||||
mk_nolabels F._nolabels;
|
mk_nolabels F._nolabels;
|
||||||
mk_noprompt F._noprompt;
|
mk_noprompt F._noprompt;
|
||||||
|
mk_nopromptcont F._nopromptcont;
|
||||||
mk_nostdlib F._nostdlib;
|
mk_nostdlib F._nostdlib;
|
||||||
mk_principal F._principal;
|
mk_principal F._principal;
|
||||||
mk_rectypes F._rectypes;
|
mk_rectypes F._rectypes;
|
||||||
|
@ -769,6 +777,7 @@ module Make_opttop_options (F : Opttop_options) = struct
|
||||||
mk_noassert F._noassert;
|
mk_noassert F._noassert;
|
||||||
mk_nolabels F._nolabels;
|
mk_nolabels F._nolabels;
|
||||||
mk_noprompt F._noprompt;
|
mk_noprompt F._noprompt;
|
||||||
|
mk_nopromptcont F._nopromptcont;
|
||||||
mk_nostdlib F._nostdlib;
|
mk_nostdlib F._nostdlib;
|
||||||
mk_principal F._principal;
|
mk_principal F._principal;
|
||||||
mk_rectypes F._rectypes;
|
mk_rectypes F._rectypes;
|
||||||
|
|
|
@ -80,6 +80,7 @@ module type Bytetop_options = sig
|
||||||
val _noassert : unit -> unit
|
val _noassert : unit -> unit
|
||||||
val _nolabels : unit -> unit
|
val _nolabels : unit -> unit
|
||||||
val _noprompt : unit -> unit
|
val _noprompt : unit -> unit
|
||||||
|
val _nopromptcont : unit -> unit
|
||||||
val _nostdlib : unit -> unit
|
val _nostdlib : unit -> unit
|
||||||
val _principal : unit -> unit
|
val _principal : unit -> unit
|
||||||
val _rectypes : unit -> unit
|
val _rectypes : unit -> unit
|
||||||
|
@ -180,6 +181,7 @@ module type Opttop_options = sig
|
||||||
val _noassert : unit -> unit
|
val _noassert : unit -> unit
|
||||||
val _nolabels : unit -> unit
|
val _nolabels : unit -> unit
|
||||||
val _noprompt : unit -> unit
|
val _noprompt : unit -> unit
|
||||||
|
val _nopromptcont : unit -> unit
|
||||||
val _nostdlib : unit -> unit
|
val _nostdlib : unit -> unit
|
||||||
val _principal : unit -> unit
|
val _principal : unit -> unit
|
||||||
val _rectypes : unit -> unit
|
val _rectypes : unit -> unit
|
||||||
|
|
|
@ -363,6 +363,7 @@ let refill_lexbuf buffer len =
|
||||||
let prompt =
|
let prompt =
|
||||||
if !Clflags.noprompt then ""
|
if !Clflags.noprompt then ""
|
||||||
else if !first_line then "# "
|
else if !first_line then "# "
|
||||||
|
else if !Clflags.nopromptcont then ""
|
||||||
else if Lexer.in_comment () then "* "
|
else if Lexer.in_comment () then "* "
|
||||||
else " "
|
else " "
|
||||||
in
|
in
|
||||||
|
|
|
@ -74,6 +74,7 @@ module Options = Main_args.Make_opttop_options (struct
|
||||||
let _noassert = set noassert
|
let _noassert = set noassert
|
||||||
let _nolabels = set classic
|
let _nolabels = set classic
|
||||||
let _noprompt = set noprompt
|
let _noprompt = set noprompt
|
||||||
|
let _nopromptcont = set nopromptcont
|
||||||
let _nostdlib = set no_std_include
|
let _nostdlib = set no_std_include
|
||||||
let _principal = set principal
|
let _principal = set principal
|
||||||
let _rectypes = set recursive_types
|
let _rectypes = set recursive_types
|
||||||
|
|
|
@ -352,6 +352,7 @@ let refill_lexbuf buffer len =
|
||||||
let prompt =
|
let prompt =
|
||||||
if !Clflags.noprompt then ""
|
if !Clflags.noprompt then ""
|
||||||
else if !first_line then "# "
|
else if !first_line then "# "
|
||||||
|
else if !Clflags.nopromptcont then ""
|
||||||
else if Lexer.in_comment () then "* "
|
else if Lexer.in_comment () then "* "
|
||||||
else " "
|
else " "
|
||||||
in
|
in
|
||||||
|
|
|
@ -71,6 +71,7 @@ module Options = Main_args.Make_bytetop_options (struct
|
||||||
let _noassert = set noassert
|
let _noassert = set noassert
|
||||||
let _nolabels = set classic
|
let _nolabels = set classic
|
||||||
let _noprompt = set noprompt
|
let _noprompt = set noprompt
|
||||||
|
let _nopromptcont = set nopromptcont
|
||||||
let _nostdlib = set no_std_include
|
let _nostdlib = set no_std_include
|
||||||
let _principal = set principal
|
let _principal = set principal
|
||||||
let _rectypes = set recursive_types
|
let _rectypes = set recursive_types
|
||||||
|
|
|
@ -39,6 +39,7 @@ and use_vmthreads = ref false (* -vmthread *)
|
||||||
and noassert = ref false (* -noassert *)
|
and noassert = ref false (* -noassert *)
|
||||||
and verbose = ref false (* -verbose *)
|
and verbose = ref false (* -verbose *)
|
||||||
and noprompt = ref false (* -noprompt *)
|
and noprompt = ref false (* -noprompt *)
|
||||||
|
and nopromptcont = ref false (* -nopromptcont *)
|
||||||
and init_file = ref (None : string option) (* -init *)
|
and init_file = ref (None : string option) (* -init *)
|
||||||
and use_prims = ref "" (* -use-prims ... *)
|
and use_prims = ref "" (* -use-prims ... *)
|
||||||
and use_runtime = ref "" (* -use-runtime ... *)
|
and use_runtime = ref "" (* -use-runtime ... *)
|
||||||
|
|
|
@ -36,6 +36,7 @@ val use_vmthreads : bool ref
|
||||||
val noassert : bool ref
|
val noassert : bool ref
|
||||||
val verbose : bool ref
|
val verbose : bool ref
|
||||||
val noprompt : bool ref
|
val noprompt : bool ref
|
||||||
|
val nopromptcont : bool ref
|
||||||
val init_file : string option ref
|
val init_file : string option ref
|
||||||
val use_prims : string ref
|
val use_prims : string ref
|
||||||
val use_runtime : string ref
|
val use_runtime : string ref
|
||||||
|
|
Loading…
Reference in New Issue