support async function (#4333)

This commit is contained in:
Alex Lam S.L
2020-12-06 21:22:40 +00:00
committed by GitHub
parent 3c384cf9a8
commit 2cbbf5c375
11 changed files with 434 additions and 62 deletions

View File

@@ -618,7 +618,7 @@ function is_timed_out(result) {
}
function is_statement(node) {
return node instanceof U.AST_Statement && !(node instanceof U.AST_Function);
return node instanceof U.AST_Statement && !(node instanceof U.AST_AsyncFunction || node instanceof U.AST_Function);
}
function merge_sequence(array, node) {