Permalink
Browse files

[enhance] compiler, syntax: Default syntax is now js-like

  • Loading branch information...
1 parent 8cf4d17 commit 5e9da00e9836ab26eda9761caf5c0730bca69a8e @BourgerieQuentin BourgerieQuentin committed Feb 2, 2012
Showing with 7 additions and 4 deletions.
  1. +1 −1 Makefile
  2. +2 −1 build_rules.ml
  3. +2 −0 opa/checkopacapi.ml
  4. +2 −2 opalang/opaSyntax.ml
View
@@ -240,7 +240,7 @@ doc.odocl:
.PHONY: packages-api
packages-api: $(MYOCAMLBUILD)
- OPAOPT="$(OPAOPT) --rebuild --api" $(OCAMLBUILD) opa-packages.stamp
+ OPAOPT="$(OPAOPT) --rebuild --api --parser classic" $(OCAMLBUILD) opa-packages.stamp
.PHONY: opadoc/doc
opadoc/doc: opadoc packages-api
View
@@ -700,7 +700,7 @@ rule "opacomp: .opack -> .native"
);
build_list build (List.map ((/) dir) (string_list_of_file (env "%.opack.depends")));
opacomp build (env "%.opack") "native"
- (S[ A"-I" ; P stdlib_packages_dir ; A"--project-root" ; P dir]));
+ (S[ A"-I" ; P stdlib_packages_dir ; A"--project-root" ; P dir; A"--parser"; A"classic";]));
rule "opacomp: .opack -> .byte"
~deps: ("%.opack"::"%.opack.depends"::"opa-packages.stamp"::"opacomp-byte.stamp"::[])
@@ -890,6 +890,7 @@ let package_building ~name ~stamp ~stdlib_only ~rebuild =
A"--warn-error"; A"root";
A"--project-root"; P Pathname.pwd; (* because the @static_resource in the stdlib expect this *)
A"--no-stdlib";
+ A"--parser"; A"classic";
opaopt;
S all_files;
] @ rebuild_opt));
View
@@ -82,6 +82,8 @@ module SA = SurfaceAst
(* -- *)
+let _ = OpaSyntax.Args.r := {!OpaSyntax.Args.r with OpaSyntax.Args.parser = OpaSyntax.Classic}
+
let validation_ok = ref true
(* f *)
@@ -10,8 +10,8 @@ module Args = struct
}
let default_options = {
- parser = Classic;
- printer = Classic;
+ parser = Js;
+ printer = Js;
}
let is_default t = if default_options.parser = t then " (default)" else ""

0 comments on commit 5e9da00

Please sign in to comment.