diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-06-08 15:40:56 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:16 -0400 |
commit | 068916b59a847bede7c6c788e803442c1833fe67 (patch) | |
tree | 18ac777e5f48a9a3fed7df5e07d2dc415a8730da /js/src/frontend/TokenStream.h | |
parent | f6193fd0f4689643f47c6ac9aa5aac3b8cc10213 (diff) | |
download | UXP-068916b59a847bede7c6c788e803442c1833fe67.tar UXP-068916b59a847bede7c6c788e803442c1833fe67.tar.gz UXP-068916b59a847bede7c6c788e803442c1833fe67.tar.lz UXP-068916b59a847bede7c6c788e803442c1833fe67.tar.xz UXP-068916b59a847bede7c6c788e803442c1833fe67.zip |
1326454 - Introduce TokenStream::warning that warns at the current offset.
Diffstat (limited to 'js/src/frontend/TokenStream.h')
-rw-r--r-- | js/src/frontend/TokenStream.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h index f08d317ba..18e9cb3ca 100644 --- a/js/src/frontend/TokenStream.h +++ b/js/src/frontend/TokenStream.h @@ -364,16 +364,18 @@ class MOZ_STACK_CLASS TokenStream // TokenStream-specific error reporters. bool reportError(unsigned errorNumber, ...); bool reportErrorNoOffset(unsigned errorNumber, ...); - bool reportWarning(unsigned errorNumber, ...); // Report the given error at the current offset. void error(unsigned errorNumber, ...); + // Warn at the current offset. + MOZ_MUST_USE bool warning(unsigned errorNumber, ...); + static const uint32_t NoOffset = UINT32_MAX; // General-purpose error reporters. You should avoid calling these - // directly, and instead use the more succinct alternatives (e.g. - // reportError()) in TokenStream, Parser, and BytecodeEmitter. + // directly, and instead use the more succinct alternatives (error(), + // warning(), &c.) in TokenStream, Parser, and BytecodeEmitter. bool reportCompileErrorNumberVA(uint32_t offset, unsigned flags, unsigned errorNumber, va_list args); bool reportStrictModeErrorNumberVA(uint32_t offset, bool strictMode, unsigned errorNumber, |