1283712 - Part 3: Add Parser::errorWithNotes and Parser::errorWithNotesAt.

This commit is contained in:
Gaming4JC 2019-06-09 14:23:16 -04:00 • committed by Roy Tam
commit dc06903cd1
5 changed files with 82 additions and 35 deletions

View file

@ -3604,7 +3604,7 @@ BytecodeEmitter::reportError(ParseNode* pn, unsigned errorNumber, ...)
va_list args;
va_start(args, errorNumber);
bool result = tokenStream()->reportCompileErrorNumberVA(pos.begin, JSREPORT_ERROR,
bool result = tokenStream()->reportCompileErrorNumberVA(nullptr, pos.begin, JSREPORT_ERROR,
errorNumber, args);
va_end(args);
return result;
@ -3617,7 +3617,8 @@ BytecodeEmitter::reportExtraWarning(ParseNode* pn, unsigned errorNumber, ...)
va_list args;
va_start(args, errorNumber);
bool result = tokenStream()->reportExtraWarningErrorNumberVA(pos.begin, errorNumber, args);
bool result = tokenStream()->reportExtraWarningErrorNumberVA(nullptr, pos.begin,
errorNumber, args);
va_end(args);
return result;
}
@ -3629,7 +3630,7 @@ BytecodeEmitter::reportStrictModeError(ParseNode* pn, unsigned errorNumber, ...)
va_list args;
va_start(args, errorNumber);
bool result = tokenStream()->reportStrictModeErrorNumberVA(pos.begin, sc->strict(),
bool result = tokenStream()->reportStrictModeErrorNumberVA(nullptr, pos.begin, sc->strict(),
errorNumber, args);
va_end(args);
return result;