diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-05 21:25:28 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-05 21:25:28 +0200 |
commit | 2950deb043a403377a589046acaa38cfe3dc9876 (patch) | |
tree | a9e3d6620661716be82a4bad8634c08a3c33a156 /js/src/frontend/Parser.h | |
parent | 68c4eea34dc0ddf680036db62f1b9daeb131cfba (diff) | |
download | UXP-2950deb043a403377a589046acaa38cfe3dc9876.tar UXP-2950deb043a403377a589046acaa38cfe3dc9876.tar.gz UXP-2950deb043a403377a589046acaa38cfe3dc9876.tar.lz UXP-2950deb043a403377a589046acaa38cfe3dc9876.tar.xz UXP-2950deb043a403377a589046acaa38cfe3dc9876.zip |
Change report at current offset to warning(), extraWarning() and error()
Diffstat (limited to 'js/src/frontend/Parser.h')
-rw-r--r-- | js/src/frontend/Parser.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/js/src/frontend/Parser.h b/js/src/frontend/Parser.h index 402b977ba..feead0e63 100644 --- a/js/src/frontend/Parser.h +++ b/js/src/frontend/Parser.h @@ -907,12 +907,14 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter bool reportHelper(ParseReportKind kind, bool strict, uint32_t offset, unsigned errorNumber, va_list args); public: - bool qeport(ParseReportKind kind, unsigned errorNumber, ...); bool reportWithNode(ParseReportKind kind, bool strict, Node pn, unsigned errorNumber, ...); bool reportNoOffset(ParseReportKind kind, bool strict, unsigned errorNumber, ...); bool reportWithOffset(ParseReportKind kind, bool strict, uint32_t offset, unsigned errorNumber, ...); + /* Report the given error at the current offset. */ + void error(unsigned errorNumber, ...); + /* * Handle a strict mode error at the current offset. Report an error if in * strict mode code, or warn if not, using the given error number and @@ -920,6 +922,15 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter */ MOZ_MUST_USE bool strictModeError(unsigned errorNumber, ...); + /* Report the given warning at the current offset. */ + MOZ_MUST_USE bool warning(unsigned errorNumber, ...); + + /* + * If extra warnings are enabled, report the given warning at the current + * offset. + */ + MOZ_MUST_USE bool extraWarning(unsigned errorNumber, ...); + Parser(ExclusiveContext* cx, LifoAlloc& alloc, const ReadOnlyCompileOptions& options, const char16_t* chars, size_t length, bool foldConstants, UsedNameTracker& usedNames, Parser<SyntaxParseHandler>* syntaxParser, LazyScript* lazyOuterFunction); |