: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
ErrorHandler.prototype.constructError = function (msg, column) {
var error = new Error(msg);
/* istanbul ignore else */
if (Object.create && Object.defineProperty) {
error = Object.create(base);
Object.defineProperty(error, 'column', { value: column });
/* istanbul ignore next */
ErrorHandler.prototype.createError = function (index, line, col, description) {
var msg = 'Line ' + line + ': ' + description;
var error = this.constructError(msg, col);
error.description = description;
ErrorHandler.prototype.throwError = function (index, line, col, description) {
throw this.createError(index, line, col, description);
ErrorHandler.prototype.tolerateError = function (index, line, col, description) {
var error = this.createError(index, line, col, description);
exports.ErrorHandler = ErrorHandler;
/***/ function(module, exports) {
Object.defineProperty(exports, "__esModule", { value: true });
// Error messages should be identical to V8.
BadGetterArity: 'Getter must not have any formal parameters',
BadSetterArity: 'Setter must have exactly one formal parameter',
BadSetterRestParameter: 'Setter function argument must not be a rest parameter',
ConstructorIsAsync: 'Class constructor may not be an async method',
ConstructorSpecialMethod: 'Class constructor may not be an accessor',
DeclarationMissingInitializer: 'Missing initializer in %0 declaration',
DefaultRestParameter: 'Unexpected token =',
DuplicateBinding: 'Duplicate binding %0',
DuplicateConstructor: 'A class may only have one constructor',
DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals',
ForInOfLoopInitializer: '%0 loop variable declaration may not have an initializer',
GeneratorInLegacyContext: 'Generator declarations are not allowed in legacy contexts',
IllegalBreak: 'Illegal break statement',
IllegalContinue: 'Illegal continue statement',
IllegalExportDeclaration: 'Unexpected token',
IllegalImportDeclaration: 'Unexpected token',
IllegalLanguageModeDirective: 'Illegal \'use strict\' directive in function with non-simple parameter list',
IllegalReturn: 'Illegal return statement',
InvalidEscapedReservedWord: 'Keyword must not contain escaped characters',
InvalidHexEscapeSequence: 'Invalid hexadecimal escape sequence',
InvalidLHSInAssignment: 'Invalid left-hand side in assignment',
InvalidLHSInForIn: 'Invalid left-hand side in for-in',
InvalidLHSInForLoop: 'Invalid left-hand side in for-loop',
InvalidModuleSpecifier: 'Unexpected token',
InvalidRegExp: 'Invalid regular expression',
LetInLexicalBinding: 'let is disallowed as a lexically bound name',
MissingFromClause: 'Unexpected token',
MultipleDefaultsInSwitch: 'More than one default clause in switch statement',
NewlineAfterThrow: 'Illegal newline after throw',
NoAsAfterImportNamespace: 'Unexpected token',
NoCatchOrFinally: 'Missing catch or finally after try',
ParameterAfterRestParameter: 'Rest parameter must be last formal parameter',
Redeclaration: '%0 \'%1\' has already been declared',
StaticPrototype: 'Classes may not have static property named prototype',
StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode',
StrictDelete: 'Delete of an unqualified identifier in strict mode.',
StrictFunction: 'In strict mode code, functions can only be declared at top level or inside a block',
StrictFunctionName: 'Function name may not be eval or arguments in strict mode',
StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode',
StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode',
StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode',
StrictModeWith: 'Strict mode code may not include a with statement',
StrictOctalLiteral: 'Octal literals are not allowed in strict mode.',
StrictParamDupe: 'Strict mode function may not have duplicate parameter names',
StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode',
StrictReservedWord: 'Use of future reserved word in strict mode',
StrictVarName: 'Variable name may not be eval or arguments in strict mode',
TemplateOctalLiteral: 'Octal literals are not allowed in template strings.',
UnexpectedEOS: 'Unexpected end of input',
UnexpectedIdentifier: 'Unexpected identifier',
UnexpectedNumber: 'Unexpected number',
UnexpectedReserved: 'Unexpected reserved word',
UnexpectedString: 'Unexpected string',
UnexpectedTemplate: 'Unexpected quasi %0',
UnexpectedToken: 'Unexpected token %0',
UnexpectedTokenIllegal: 'Unexpected token ILLEGAL',
UnknownLabel: 'Undefined label \'%0\'',
UnterminatedRegExp: 'Invalid regular expression: missing /'
/***/ function(module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", { value: true });
var assert_1 = __webpack_require__(9);
var character_1 = __webpack_require__(4);
var messages_1 = __webpack_require__(11);
return '0123456789abcdef'.indexOf(ch.toLowerCase());
function octalValue(ch) {
return '01234567'.indexOf(ch);
var Scanner = (function () {
function Scanner(code, handler) {
this.errorHandler = handler;
this.trackComment = false;
this.length = code.length;
this.lineNumber = (code.length > 0) ? 1 : 0;
Scanner.prototype.saveState = function () {
lineNumber: this.lineNumber,
lineStart: this.lineStart
Scanner.prototype.restoreState = function (state) {
this.index = state.index;
this.lineNumber = state.lineNumber;
this.lineStart = state.lineStart;
Scanner.prototype.eof = function () {
return this.index >= this.length;
Scanner.prototype.throwUnexpectedToken = function (message) {
if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; }
return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);
Scanner.prototype.tolerateUnexpectedToken = function (message) {
if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; }
this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);
// https://tc39.github.io/ecma262/#sec-comments
Scanner.prototype.skipSingleLineComment = function (offset) {
start = this.index - offset;
column: this.index - this.lineStart - offset
var ch = this.source.charCodeAt(this.index);
if (character_1.Character.isLineTerminator(ch)) {
column: this.index - this.lineStart - 1
slice: [start + offset, this.index - 1],
range: [start, this.index - 1],
if (ch === 13 && this.source.charCodeAt(this.index) === 10) {
this.lineStart = this.index;
column: this.index - this.lineStart
slice: [start + offset, this.index],
range: [start, this.index],
Scanner.prototype.skipMultiLineComment = function () {
column: this.index - this.lineStart - 2
var ch = this.source.charCodeAt(this.index);
if (character_1.Character.isLineTerminator(ch)) {
if (ch === 0x0D && this.source.charCodeAt(this.index + 1) === 0x0A) {
this.lineStart = this.index;
// Block comment ends with '*/'.
if (this.source.charCodeAt(this.index + 1) === 0x2F) {
column: this.index - this.lineStart
slice: [start + 2, this.index - 2],
range: [start, this.index],
// Ran off the end of the file - the whole thing is a comment
column: this.index - this.lineStart
slice: [start + 2, this.index],
range: [start, this.index],
this.tolerateUnexpectedToken();
Scanner.prototype.scanComments = function () {
var start = (this.index === 0);
var ch = this.source.charCodeAt(this.index);
if (character_1.Character.isWhiteSpace(ch)) {
else if (character_1.Character.isLineTerminator(ch)) {
if (ch === 0x0D && this.source.charCodeAt(this.index) === 0x0A) {
this.lineStart = this.index;
ch = this.source.charCodeAt(this.index + 1);
var comment = this.skipSingleLineComment(2);
comments = comments.concat(comment);
var comment = this.skipMultiLineComment();
comments = comments.concat(comment);
else if (start && ch === 0x2D) {
if ((this.source.charCodeAt(this.index + 1) === 0x2D) && (this.source.charCodeAt(this.index + 2) === 0x3E)) {
// '-->' is a single-line comment
var comment = this.skipSingleLineComment(3);
comments = comments.concat(comment);
if (this.source.slice(this.index + 1, this.index + 4) === '!--') {
this.index += 4; // `<!--`
var comment = this.skipSingleLineComment(4);
comments = comments.concat(comment);
// https://tc39.github.io/ecma262/#sec-future-reserved-words
Scanner.prototype.isFutureReservedWord = function (id) {
Scanner.prototype.isStrictModeReservedWord = function (id) {
Scanner.prototype.isRestrictedWord = function (id) {
return id === 'eval' || id === 'arguments';
// https://tc39.github.io/ecma262/#sec-keywords
Scanner.prototype.isKeyword = function (id) {
return (id === 'if') || (id === 'in') || (id === 'do');
return (id === 'var') || (id === 'for') || (id === 'new') ||
(id === 'try') || (id === 'let');
return (id === 'this') || (id === 'else') || (id === 'case') ||
(id === 'void') || (id === 'with') || (id === 'enum');
return (id === 'while') || (id === 'break') || (id === 'catch') ||
(id === 'throw') || (id === 'const') || (id === 'yield') ||
(id === 'class') || (id === 'super');
return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
(id === 'switch') || (id === 'export') || (id === 'import');
return (id === 'default') || (id === 'finally') || (id === 'extends');
return (id === 'function') || (id === 'continue') || (id === 'debugger');
return (id === 'instanceof');
Scanner.prototype.codePointAt = function (i) {
var cp = this.source.charCodeAt(i);
if (cp >= 0xD800 && cp <= 0xDBFF) {
var second = this.source.charCodeAt(i + 1);
if (second >= 0xDC00 && second <= 0xDFFF) {
cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
Scanner.prototype.scanHexEscape = function (prefix) {
var len = (prefix === 'u') ? 4 : 2;
for (var i = 0; i < len; ++i) {
if (!this.eof() && character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) {
code = code * 16 + hexValue(this.source[this.index++]);
return String.fromCharCode(code);
Scanner.prototype.scanUnicodeCodePointEscape = function () {
var ch = this.source[this.index];
// At least, one hex digit is required.
this.throwUnexpectedToken();
ch = this.source[this.index++];
if (!character_1.Character.isHexDigit(ch.charCodeAt(0))) {
code = code * 16 + hexValue(ch);
if (code > 0x10FFFF || ch !== '}') {
this.throwUnexpectedToken();
return character_1.Character.fromCodePoint(code);
Scanner.prototype.getIdentifier = function () {
var start = this.index++;
var ch = this.source.charCodeAt(this.index);
// Blackslash (U+005C) marks Unicode escape sequence.
return this.getComplexIdentifier();
else if (ch >= 0xD800 && ch < 0xDFFF) {
// Need to handle surrogate pairs.
return this.getComplexIdentifier();
if (character_1.Character.isIdentifierPart(ch)) {
return this.source.slice(start, this.index);
Scanner.prototype.getComplexIdentifier = function () {
var cp = this.codePointAt(this.index);
var id = character_1.Character.fromCodePoint(cp);
// '\u' (U+005C, U+0075) denotes an escaped character.
if (this.source.charCodeAt(this.index) !== 0x75) {
this.throwUnexpectedToken();
if (this.source[this.index] === '{') {
ch = this.scanUnicodeCodePointEscape();
ch = this.scanHexEscape('u');
if (ch === null || ch === '\\' || !character_1.Character.isIdentifierStart(ch.charCodeAt(0))) {
this.throwUnexpectedToken();