mirror of
https://github.com/github/codeql.git
synced 2026-02-23 18:33:42 +01:00
JavaScript: Allow first expression in array literal to be an in expression.
This commit is contained in:
@@ -147,7 +147,7 @@ public class CustomParser extends FlowParser {
|
||||
this.type == TokenType.ellipsis) {
|
||||
elements = this.parseExprList(TokenType.bracketR, true, true, refDestructuringErrors);
|
||||
} else {
|
||||
Expression firstExpr = this.parseMaybeAssign(true, refDestructuringErrors, null);
|
||||
Expression firstExpr = this.parseMaybeAssign(false, refDestructuringErrors, null);
|
||||
// check whether this is a postfix array comprehension
|
||||
if (this.type == TokenType._for || this.type == TokenType._if) {
|
||||
ComprehensionExpression c = this.parseComprehension(startLoc, false, firstExpr);
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Main {
|
||||
* such a way that it may produce different tuples for the same file under the same
|
||||
* {@link ExtractorConfig}.
|
||||
*/
|
||||
public static final String EXTRACTOR_VERSION = "2019-02-04";
|
||||
public static final String EXTRACTOR_VERSION = "2019-02-27";
|
||||
|
||||
public static final Pattern NEWLINE = Pattern.compile("\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user