Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Commit

Permalink
Update API documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyGu committed Jan 29, 2017
1 parent 898c4a7 commit bc9ed98
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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"`.
Expand All @@ -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][].
Expand Down

0 comments on commit bc9ed98

Please sign in to comment.