summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/TokenStream.h
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-04-08 18:56:39 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-04-08 18:56:39 -0400
commit6968a3e4021dbd241c0193b47e8abf49c9281506 (patch)
treecd608537c0787f280f8600beb2399ad0de94668d /js/src/frontend/TokenStream.h
parent015f385ecb39218830fc6f9e1fb81e34e1c21901 (diff)
parent964c9830fa956249e5f3f3e30bf5d2d307ca3572 (diff)
downloadUXP-6968a3e4021dbd241c0193b47e8abf49c9281506.tar
UXP-6968a3e4021dbd241c0193b47e8abf49c9281506.tar.gz
UXP-6968a3e4021dbd241c0193b47e8abf49c9281506.tar.lz
UXP-6968a3e4021dbd241c0193b47e8abf49c9281506.tar.xz
UXP-6968a3e4021dbd241c0193b47e8abf49c9281506.zip
Merge branch 'master' into Sync-weave
Diffstat (limited to 'js/src/frontend/TokenStream.h')
-rw-r--r--js/src/frontend/TokenStream.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h
index 5d6b4b795..6ba9fba5a 100644
--- a/js/src/frontend/TokenStream.h
+++ b/js/src/frontend/TokenStream.h
@@ -375,8 +375,7 @@ class MOZ_STACK_CLASS TokenStream
va_list args);
bool reportStrictModeErrorNumberVA(uint32_t offset, bool strictMode, unsigned errorNumber,
va_list args);
- bool reportStrictWarningErrorNumberVA(uint32_t offset, unsigned errorNumber,
- va_list args);
+ bool reportExtraWarningErrorNumberVA(uint32_t offset, unsigned errorNumber, va_list args);
// asm.js reporter
void reportAsmJSError(uint32_t offset, unsigned errorNumber, ...);
@@ -570,6 +569,14 @@ class MOZ_STACK_CLASS TokenStream
return true;
}
+ MOZ_MUST_USE bool peekOffset(uint32_t* offset, Modifier modifier = None) {
+ TokenPos pos;
+ if (!peekTokenPos(&pos, modifier))
+ return false;
+ *offset = pos.begin;
+ return true;
+ }
+
// This is like peekToken(), with one exception: if there is an EOL
// between the end of the current token and the start of the next token, it
// return true and store TOK_EOL in |*ttp|. In that case, no token with