summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/Parser.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-07-14 10:26:41 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:44 -0400
commite93a48121a1a14ac228bebe362e7c27b1aadd4d5 (patch)
tree17bcc3a4a237a8524759f919f18310ca4e6278a6 /js/src/frontend/Parser.cpp
parent10227d77bfccda845a63e20b22bc4367ecc7b4e0 (diff)
downloadUXP-e93a48121a1a14ac228bebe362e7c27b1aadd4d5.tar
UXP-e93a48121a1a14ac228bebe362e7c27b1aadd4d5.tar.gz
UXP-e93a48121a1a14ac228bebe362e7c27b1aadd4d5.tar.lz
UXP-e93a48121a1a14ac228bebe362e7c27b1aadd4d5.tar.xz
UXP-e93a48121a1a14ac228bebe362e7c27b1aadd4d5.zip
420857 - Part 4: Report the position of opening bracket for missing bracket error in array literal.
Diffstat (limited to 'js/src/frontend/Parser.cpp')
-rw-r--r--js/src/frontend/Parser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp
index 7dc3cdf8f..3154e41d5 100644
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -9289,7 +9289,9 @@ Parser<ParseHandler>::arrayInitializer(YieldHandling yieldHandling, PossibleErro
}
}
- MUST_MATCH_TOKEN_MOD(TOK_RB, modifier, JSMSG_BRACKET_AFTER_LIST);
+ MUST_MATCH_TOKEN_MOD_WITH_REPORT(TOK_RB, modifier,
+ reportMissingClosing(JSMSG_BRACKET_AFTER_LIST,
+ JSMSG_BRACKET_OPENED, begin));
}
handler.setEndPosition(literal, pos().end);
return literal;