Chiffon
Chiffon copied to clipboard
Breaks with ES6 - Harmony specs
@polygonplanet I noticed this parser is not 100% Harmony compatible?
I tried a few different comboes, and they all failed for me.
//-
function* wrap() {\n(a = yield b)\n}
//-
async function foo() { }
//- a reference and a normal function declaration if there is a linebreak between 'async' and 'function'.
async\nfunction foo() { }
//-
export async function foo() { }
//-
export default async function() { }
//- 'await' is valid as function names.
async function await() { }
//- async === true
(async function foo() { })
//- export default
export default (async function() { })
//-
async a => a
//-
async () => a
//-
async (await)
//-
async yield => 1
//-
({async foo() { }})
//-
({async await() { }})
// -
({ x(...[ a, b ]){} })
// -
({ x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){} })
//-
(...a) => {}
//-
(a, ...b) => {}
//-
({ a }) => {}
//-
({ a }, ...b) => {}
//-
({ a: [a, b] }, ...c) => {}
//-
({ a: b, c }, [d, e], ...f) => {}
//-
[a, ...[b, c]] = d
//-
var [a, ...[b, c]] = d
//-
func(...a)
//-
func(a, ...b)
//-
func(...a, b)
//-
/[a-z]/u
//-
({x = 0}) => x
//-
({*yield() {}})
//-
class A { static() {} }
//-
'`${/\\d/.exec('1')[0]}` // unknown '1'
//-
var await = 0
//-
(([,]) => 0
//-
function* yield() {} // yield as function name
//-
function* foo(a = function*(b) { yield b }) { }
Thanks for report!
Yes, Chiffon is not 100% Harmony compatible yet.
Currently, awaut/async is not supports in this module.
I'll fix this.
@polygonplanet Any time frame on when you will publish the new changes? I really like your module 👍