pvdz / tenko

An 100% spec compliant ES2021 JavaScript parser written in JS

Home Page:https://pvdz.github.io/tenko/repl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fails on parsing async edge cases in for-of statement

KFlash opened this issue · comments

Tenko doesn't parse 'async function f() { for await (async of []); }' and similar cases

This should be an easy fix. When parsing out async expression, return 'async' as identifier if parsing in 'ForStatement' context. That way you can solve it after parsing out the 'of' keyword in 'for( ..... of'.