Skip to content

Commit e812e86

Browse files
authored
Merge pull request #9 from reason-in-barcelona/Migrate-to-ppxlib
2 parents a567efe + ddee958 commit e812e86

File tree

43 files changed

+566
-883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+566
-883
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
},
55
"ocaml.sandbox": {
66
"kind": "esy",
7-
"root": "/Users/davesnx/dev/reason-in-barcelona/react-rules-of-hooks-ppx"
7+
"root": "${workspaceFolder:react-rules-of-hooks-ppx}"
88
},
99
}

bin/Bin.re

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
1-
let argv =
2-
switch (Sys.argv |> Array.to_list) {
3-
| [program, ...rest] =>
4-
switch (List.rev(rest)) {
5-
| [output_file, input_file, ...args] =>
6-
List.concat([
7-
[program],
8-
List.rev(args),
9-
[input_file, "-o", output_file, "--dump-ast"],
10-
])
11-
|> Array.of_list
12-
| _ => Sys.argv
13-
}
14-
| _ => Sys.argv
15-
};
16-
17-
let () = Migrate_parsetree.Driver.run_main(~argv, ());
1+
Ppxlib.Driver.run_as_ppx_rewriter()

bin/Standalone.re

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ppxlib.Driver.standalone()

bin/dune

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
(executable
22
(name Bin)
3+
(modules Bin)
34
(public_name react-rules-of-hooks-ppx)
45
(libraries ReactRulesOfHooksPpx.lib)
5-
(ocamlopt_flags ( -linkall ))
66
(package ReactRulesOfHooksPpx)
77
)
8+
9+
(executable
10+
(name Standalone)
11+
(modules Standalone)
12+
(libraries ReactRulesOfHooksPpx.lib)
13+
)

0 commit comments

Comments
 (0)