support generator functions (#4620)

This commit is contained in:
Alex Lam S.L
2021-02-07 22:44:20 +00:00
committed by GitHub
parent c44b6399c3
commit fd4caf7a9c
12 changed files with 1186 additions and 182 deletions

View File

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