"Fossies" - the Fresh Open Source Software Archive

Member "flow-0.149.0/src/parser/README.md" (14 Apr 2021, 1195 Bytes) of package /linux/www/flow-0.149.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the latest Fossies "Diffs" side-by-side code changes report for "README.md": 0.148.0_vs_0.149.0.

The Flow Parser

The Flow Parser is a JavaScript parser written in OCaml. It produces an AST that conforms to SpiderMonkey's Parser API and that mostly matches what esprima produces. The Flow Parser can be compiled to native code or can be compiled to JavaScript using js_of_ocaml.

Building the Flow Parser

Building the Flow Parser requires OCaml. Compiling to JavaScript requires js_of_ocaml.

Initial set up

Building the OCaml Flow Parser library

make

Compiling the Flow Parser to JavaScript

make js

Tests

The Flow Parser's test suite tests the JavaScript version of the parser, so you will need js_of_ocaml installed. The tests and tools also have some node module dependencies, so you will need to run

Initial set up

Running the Tests

make test