Make tokens optional (#563)

Adding tokens to the ast is significant slower and most tools
don't ever use them anyway
This commit is contained in:
Daniel Tschinder
2017-06-27 20:26:24 -07:00
committed by Henry Zhu
parent 3d03414c05
commit fecdb6feeb
12 changed files with 786 additions and 7 deletions

View File

@@ -63,6 +63,8 @@ mind. When in doubt, use `.parse()`.
- **ranges**: Adds a `ranges` property to each node: `[node.start, node.end]`
- **tokens**: Adds all parsed tokens to a `tokens` property on the `File` node
### Output
Babylon generates AST according to [Babel AST format][].