mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-11-03 04:57:31 +09:00
Rename TokenStream::reportStrictWarningErrorNumberVA to
TokenStream::reportExtraWarningErrorNumberVA for clarity. Emit Extra Warnings instead of Strict Warnings from the BCE where it makes sense.
This commit is contained in:
parent
eea318fce4
commit
0c3fb437a9
5 changed files with 9 additions and 10 deletions
|
|
@ -3608,13 +3608,13 @@ BytecodeEmitter::reportError(ParseNode* pn, unsigned errorNumber, ...)
|
|||
}
|
||||
|
||||
bool
|
||||
BytecodeEmitter::reportStrictWarning(ParseNode* pn, unsigned errorNumber, ...)
|
||||
BytecodeEmitter::reportExtraWarning(ParseNode* pn, unsigned errorNumber, ...)
|
||||
{
|
||||
TokenPos pos = pn ? pn->pn_pos : tokenStream()->currentToken().pos;
|
||||
|
||||
va_list args;
|
||||
va_start(args, errorNumber);
|
||||
bool result = tokenStream()->reportStrictWarningErrorNumberVA(pos.begin, errorNumber, args);
|
||||
bool result = tokenStream()->reportExtraWarningErrorNumberVA(pos.begin, errorNumber, args);
|
||||
va_end(args);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -8707,13 +8707,13 @@ BytecodeEmitter::emitStatement(ParseNode* pn)
|
|||
}
|
||||
|
||||
if (directive) {
|
||||
if (!reportStrictWarning(pn2, JSMSG_CONTRARY_NONDIRECTIVE, directive))
|
||||
if (!reportExtraWarning(pn2, JSMSG_CONTRARY_NONDIRECTIVE, directive))
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
current->currentLine = parser->tokenStream.srcCoords.lineNum(pn2->pn_pos.begin);
|
||||
current->lastColumn = 0;
|
||||
if (!reportStrictWarning(pn2, JSMSG_USELESS_EXPR))
|
||||
if (!reportExtraWarning(pn2, JSMSG_USELESS_EXPR))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue