summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/Parser.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-04-05 21:32:55 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-04-05 21:32:55 +0200
commit11a1f58b9a0ebf83c17087a89e6b4ba83748374a (patch)
tree86c539b27aab1dccfe18de803e80a44ad1a161ad /js/src/frontend/Parser.h
parent1ee96e39db760004c33a235ea691ab06bac21375 (diff)
downloadUXP-11a1f58b9a0ebf83c17087a89e6b4ba83748374a.tar
UXP-11a1f58b9a0ebf83c17087a89e6b4ba83748374a.tar.gz
UXP-11a1f58b9a0ebf83c17087a89e6b4ba83748374a.tar.lz
UXP-11a1f58b9a0ebf83c17087a89e6b4ba83748374a.tar.xz
UXP-11a1f58b9a0ebf83c17087a89e6b4ba83748374a.zip
Track strict mode errors in unary deletions correctly when
syntax-parsing.
Diffstat (limited to 'js/src/frontend/Parser.h')
-rw-r--r--js/src/frontend/Parser.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/src/frontend/Parser.h b/js/src/frontend/Parser.h
index feead0e63..c8914a2d7 100644
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -922,6 +922,13 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter
*/
MOZ_MUST_USE bool strictModeError(unsigned errorNumber, ...);
+ /*
+ * Handle a strict mode error at the given offset. Report an error if in
+ * strict mode code, or warn if not, using the given error number and
+ * arguments.
+ */
+ MOZ_MUST_USE bool strictModeErrorAt(uint32_t offset, unsigned errorNumber, ...);
+
/* Report the given warning at the current offset. */
MOZ_MUST_USE bool warning(unsigned errorNumber, ...);