Flow parser with Fastpack-specific modifications
Clone or download
Latest commit a4d10a8 Sep 29, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin flow_parser 0.70.0 Sep 29, 2018
lib flow_parser 0.70.0 Sep 29, 2018
.gitignore flow_parser 0.70.0 Sep 29, 2018
LICENSE flow_parser 0.70.0 Sep 29, 2018
Makefile flow_parser 0.70.0 Sep 29, 2018
README.md flow_parser 0.70.0 Sep 29, 2018
dune-ignore flow_parser 0.70.0 Sep 29, 2018
dune-project flow_parser 0.70.0 Sep 29, 2018
esy.lock.json flow_parser 0.70.0 Sep 29, 2018
flow_parser.install flow_parser 0.70.0 Sep 29, 2018
flow_parser.opam flow_parser 0.70.0 Sep 29, 2018
package.json flow_parser 0.70.0 Sep 29, 2018

README.md

flow_parser

Flow parser with Fastpack-specific modifications

Upgrading the Flow version

Change version in the Makefile and package.json and run:

$ make clean && make flow

Copy the parser code to lib/:

$ cp -R flow/src/parser/* lib

Manually modify lib/parser_env.mli:

36a37
+   types_in_comments: bool;

And lib/parser_env.ml:

161a162
+   types_in_comments: bool;
170a172
+   types_in_comments = true;
229c231
-   let enable_types_in_comments = parse_options.types in
---
+   let enable_types_in_comments = parse_options.types && parse_options.types_in_comments in

Make sure it compiles and test passes:

$ make test
...
types_in_comments=false: OK
types_in_comments=true: OK

To publish the package, run:

$ npm publish