Track strict mode errors in unary deletions correctly when

syntax-parsing.
This commit is contained in:
wolfbeast 2019-04-05 21:32:55 +02:00 • committed by Roy Tam
commit e92f878a93
2 changed files with 24 additions and 2 deletions

View file

@ -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, ...);