mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
Introduce Parser::warningAt
This reduces reporting an warning at a particular offset to its bare essentials, simplifying calls.
This commit is contained in:
parent
8542ac5f61
commit
218c8ce05c
2 changed files with 19 additions and 12 deletions
|
|
@ -909,8 +909,6 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter
|
|||
public:
|
||||
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, ...);
|
||||
|
|
@ -935,6 +933,9 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter
|
|||
/* Report the given warning at the current offset. */
|
||||
MOZ_MUST_USE bool warning(unsigned errorNumber, ...);
|
||||
|
||||
/* Report the given warning at the given offset. */
|
||||
MOZ_MUST_USE bool warningAt(uint32_t offset, unsigned errorNumber, ...);
|
||||
|
||||
/*
|
||||
* If extra warnings are enabled, report the given warning at the current
|
||||
* offset.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue