flow-parser 0.275.0 → 0.277.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -6
- package/flow_parser.js +1909 -1901
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,11 +34,16 @@ flow.parse('1+1', {});
|
|
|
34
34
|
|
|
35
35
|
The second argument to `flow.parse` is the options object. Currently supported options:
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
* `comments` (boolean, default `true`) - attach comments to AST nodes (`leadingComments` and `trailingComments`)
|
|
39
|
-
* `enums` (boolean, default `false`) - enable parsing of Flow enums
|
|
40
|
-
* `esproposal_decorators` (boolean, default `false`) - enable parsing of decorators
|
|
41
|
-
* `esproposal_export_star_as` (boolean, default `false`) - enable parsing of `export * as` syntax
|
|
42
|
-
* `tokens` (boolean, default `false`) - include a list of all parsed tokens in a top-level `tokens` property
|
|
37
|
+
### Basic options
|
|
43
38
|
* `types` (boolean, default `true`) - enable parsing of Flow types
|
|
44
39
|
* `use_strict` (boolean, default `false`) - treat the file as strict, without needing a "use strict" directive
|
|
40
|
+
* `comments` (boolean, default `true`) - attach comments to AST nodes (`leadingComments` and `trailingComments`)
|
|
41
|
+
* `all_comments` (boolean, default `true`) - include a list of all comments from the whole program
|
|
42
|
+
* `tokens` (boolean, default `false`) - include a list of all parsed tokens in a top-level `tokens` property
|
|
43
|
+
|
|
44
|
+
### Language features
|
|
45
|
+
* `enums` (boolean, default `false`) - enable parsing of [enums](https://flow.org/en/docs/enums/)
|
|
46
|
+
* `match` (boolean, default `false`) - enable parsing of [match expressions and match statements](https://flow.org/en/docs/match/)
|
|
47
|
+
* `components` (boolean, default `false`) - enable parsing of [component syntax](https://flow.org/en/docs/react/component-syntax/)
|
|
48
|
+
* `assert_operator` (boolean, default `false`) - enable parsing of the assert operator
|
|
49
|
+
* `esproposal_decorators` (boolean, default `false`) - enable parsing of decorators
|