mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
Change report at current offset to warning(), extraWarning() and error()
This commit is contained in:
parent
70fbb46d9e
commit
a652eb1916
2 changed files with 152 additions and 122 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue