File tree Expand file tree Collapse file tree 7 files changed +769
-1
lines changed
ql/test/library-tests/ES20xxFeatures Expand file tree Collapse file tree 7 files changed +769
-1
lines changed Original file line number Diff line number Diff line change 1+ [[ condition: enterprise-only ]]
2+
3+ # Improvements to JavaScript analysis
4+
5+ ## Changes to code extraction
6+
7+ * Asynchronous generator methods are now parsed correctly and no longer cause a spurious syntax error.
Original file line number Diff line number Diff line change @@ -1944,6 +1944,7 @@ protected Property parseProperty(
19441944 this .parsePropertyName (pi );
19451945 if (!isPattern && this .options .ecmaVersion () >= 8 && !isGenerator && this .isAsyncProp (pi )) {
19461946 pi .isAsync = true ;
1947+ pi .isGenerator = this .eat (TokenType .star );
19471948 this .parsePropertyName (pi );
19481949 } else {
19491950 pi .isAsync = false ;
@@ -1964,6 +1965,7 @@ private boolean isAsyncProp(PropertyInfo pi) {
19641965 || this .type == TokenType .num
19651966 || this .type == TokenType .string
19661967 || this .type == TokenType .bracketL
1968+ || this .type == TokenType .star
19671969 || this .type .keyword != null )
19681970 && !this .canInsertSemicolon ();
19691971 }
@@ -3166,6 +3168,7 @@ protected MemberDefinition<?> parseClassMember(boolean hadConstructor) {
31663168 }
31673169 if (this .options .ecmaVersion () >= 8 && !isGenerator && this .isAsyncProp (pi )) {
31683170 pi .isAsync = true ;
3171+ pi .isGenerator = this .eat (TokenType .star );
31693172 this .parsePropertyName (pi );
31703173 }
31713174 return parseClassPropertyBody (pi , hadConstructor , isStatic );
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public class Main {
3737 * A version identifier that should be updated every time the extractor changes in such a way that
3838 * it may produce different tuples for the same file under the same {@link ExtractorConfig}.
3939 */
40- public static final String EXTRACTOR_VERSION = "2019-07-25 " ;
40+ public static final String EXTRACTOR_VERSION = "2019-09-02 " ;
4141
4242 public static final Pattern NEWLINE = Pattern .compile ("\n " );
4343
Original file line number Diff line number Diff line change 1+ async function * asyncFn ( ) { }
2+
3+ class C {
4+ async * asyncMeth ( ) { }
5+ async * [ Symbol . asyncIterator ] ( ) { }
6+ }
7+
8+ var o = {
9+ async * asyncMeth ( ) { } ,
10+ async * [ Symbol . asyncIterator ] ( ) { }
11+ }
You can’t perform that action at this time.
0 commit comments