Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[enhance] syntax: added function set_parser to set the parser

  • Loading branch information...
commit cdfbbd4e12cf65c717e8ef970edff0d0733f17a8 1 parent c0a4ed4
@Aqua-Ye Aqua-Ye authored
Showing with 4 additions and 0 deletions.
  1. +2 −0  compiler/opalang/opaSyntax.ml
  2. +2 −0  compiler/opalang/opaSyntax.mli
View
2  compiler/opalang/opaSyntax.ml
@@ -50,6 +50,8 @@ module Args = struct
| None -> !r.parser
| Some filename -> try StringMap.find filename !r.files with Not_found -> !r.parser
+ let set_parser p = r := { !r with parser = p }
+
let options = [
("--parser", Arg.String parser_options,
"Select kind of the input syntax (classic or js-like)");
View
2  compiler/opalang/opaSyntax.mli
@@ -26,6 +26,8 @@ module Args : sig
val get_parser : string option -> t
+ val set_parser : t -> unit
+
val options : (string * Base.Arg.spec * string) list
end
Please sign in to comment.
Something went wrong with that request. Please try again.