Posted on:
Worked on and added following ES6 features support to Acorn - small, fast JavaScript parser:
- Unicode Code Point Escape Sequences (
\u{ABCDEF}
). - Numeric Literals (octal, binary).
- Arrow Functions.
- Spread Element.
- Classes.
- Destructuring assignments.
- Computed object properties.
- Object methods.
- Shorthand object properties.
for (... of ...)
loops.- Array Comprehensions.
- Modules. (newest specs)
- Template Strings.
- Generators.
- Generator Comprehensions.
There are still some pending discussions with guys from Mozilla & Esprima on new AST types & properties used for new syntax features:
- Support default and named bindings in one ImportDeclaration
- Support newest export syntax
- Support new
import * as X from "Y"
alternative ofmodule X from Y
- ES6: Generator Comprehension support
Stay tuned - more to come!
More posts:
- Next: Github project: jsx-ast
- Previous: Github project: jsx-transpiler