mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 822283 - Make APIs that access strictMode() on the TokenStream private. r=njn
--HG-- extra : rebase_source : 9707c69c9a9dc5fd8f762e770d4fec9a03c98af2
This commit is contained in:
parent
645be75d17
commit
794ff95ee7
@ -611,16 +611,6 @@ TokenStream::reportWarning(unsigned errorNumber, ...)
|
||||
return result;
|
||||
}
|
||||
|
||||
bool
|
||||
TokenStream::reportStrictWarning(unsigned errorNumber, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, errorNumber);
|
||||
bool result = reportStrictWarningErrorNumberVA(NULL, strictMode(), errorNumber, args);
|
||||
va_end(args);
|
||||
return result;
|
||||
}
|
||||
|
||||
bool
|
||||
TokenStream::reportStrictWarningErrorNumberVA(ParseNode *pn, bool strictMode, unsigned errorNumber,
|
||||
va_list args)
|
||||
|
@ -524,7 +524,6 @@ class TokenStream
|
||||
void setXMLOnlyMode(bool enabled = true) { setFlag(enabled, TSF_XMLONLYMODE); }
|
||||
void setUnexpectedEOF(bool enabled = true) { setFlag(enabled, TSF_UNEXPECTED_EOF); }
|
||||
|
||||
bool strictMode() const { return strictModeGetter && strictModeGetter->get(); }
|
||||
bool isXMLTagMode() const { return !!(flags & TSF_XMLTAGMODE); }
|
||||
bool isXMLOnlyMode() const { return !!(flags & TSF_XMLONLYMODE); }
|
||||
bool isUnexpectedEOF() const { return !!(flags & TSF_UNEXPECTED_EOF); }
|
||||
@ -534,8 +533,6 @@ class TokenStream
|
||||
// TokenStream-specific error reporters.
|
||||
bool reportError(unsigned errorNumber, ...);
|
||||
bool reportWarning(unsigned errorNumber, ...);
|
||||
bool reportStrictWarning(unsigned errorNumber, ...);
|
||||
bool reportStrictModeError(unsigned errorNumber, ...);
|
||||
|
||||
// General-purpose error reporters. You should avoid calling these
|
||||
// directly, and instead use the more succinct alternatives (e.g.
|
||||
@ -548,6 +545,11 @@ class TokenStream
|
||||
va_list args);
|
||||
|
||||
private:
|
||||
// These are private because they should only be called by the tokenizer
|
||||
// while tokenizing not by, for example, BytecodeEmitter.
|
||||
bool reportStrictModeError(unsigned errorNumber, ...);
|
||||
bool strictMode() const { return strictModeGetter && strictModeGetter->get(); }
|
||||
|
||||
void onError();
|
||||
static JSAtom *atomize(JSContext *cx, CharBuffer &cb);
|
||||
bool putIdentInTokenbuf(const jschar *identStart);
|
||||
|
Loading…
Reference in New Issue
Block a user