summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/Parser.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-04-06 10:33:24 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-04-06 10:33:24 +0200
commit940a6ceb9a5b3d8c7c2ed53da67f5c14cc84925c (patch)
tree68b090fa0d3c695bc54b79500c56a8e8b7ed84f2 /js/src/frontend/Parser.h
parentd7b76a5a5286475fcba1663028032a7ea834daed (diff)
downloadUXP-940a6ceb9a5b3d8c7c2ed53da67f5c14cc84925c.tar
UXP-940a6ceb9a5b3d8c7c2ed53da67f5c14cc84925c.tar.gz
UXP-940a6ceb9a5b3d8c7c2ed53da67f5c14cc84925c.tar.lz
UXP-940a6ceb9a5b3d8c7c2ed53da67f5c14cc84925c.tar.xz
UXP-940a6ceb9a5b3d8c7c2ed53da67f5c14cc84925c.zip
Introduce Parser::warningAt
This reduces reporting an warning at a particular offset to its bare essentials, simplifying calls.
Diffstat (limited to 'js/src/frontend/Parser.h')
-rw-r--r--js/src/frontend/Parser.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/src/frontend/Parser.h b/js/src/frontend/Parser.h
index 27a10458b..6bd7e586e 100644
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -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.