Update API documentation (#330)
This commit is contained in:
parent
4bd682e90b
commit
88d38a1abb
10
README.md
10
README.md
@ -27,6 +27,12 @@ Significant diversions are expected to occur in the future such as streaming, EB
|
||||
|
||||
### `babylon.parse(code, [options])`
|
||||
|
||||
### `babylon.parseExpression(code, [options])`
|
||||
|
||||
`parse()` parses the provided `code` as an entire ECMAScript program, while
|
||||
`parseExpression()` tries to parse a single Expression with performance in
|
||||
mind. When in doubt, use `.parse()`.
|
||||
|
||||
### Options
|
||||
|
||||
- **allowImportExportEverywhere**: By default, `import` and `export`
|
||||
@ -37,7 +43,7 @@ Significant diversions are expected to occur in the future such as streaming, EB
|
||||
the top level raises an error. Set this to `true` to accept such
|
||||
code.
|
||||
|
||||
- **allowSuperOutsideMethod** TODO
|
||||
- **allowSuperOutsideMethod**: TODO
|
||||
|
||||
- **sourceType**: Indicate the mode the code should be parsed in. Can be
|
||||
either `"script"` or `"module"`.
|
||||
@ -46,6 +52,8 @@ Significant diversions are expected to occur in the future such as streaming, EB
|
||||
|
||||
- **plugins**: Array containing the plugins that you want to enable.
|
||||
|
||||
- **strictMode**: TODO
|
||||
|
||||
### Output
|
||||
|
||||
Babylon generates AST according to [Babel AST format][].
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user