Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-inclu.../js/codemirr...
File: esprima.js
var params = this.parseFormalParameters();
[4500] Fix | Delete
this.context.allowYield = false;
[4501] Fix | Delete
var method = this.parsePropertyMethod(params);
[4502] Fix | Delete
this.context.allowYield = previousAllowYield;
[4503] Fix | Delete
return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator));
[4504] Fix | Delete
};
[4505] Fix | Delete
// https://tc39.github.io/ecma262/#sec-generator-function-definitions
[4506] Fix | Delete
Parser.prototype.isStartOfExpression = function () {
[4507] Fix | Delete
var start = true;
[4508] Fix | Delete
var value = this.lookahead.value;
[4509] Fix | Delete
switch (this.lookahead.type) {
[4510] Fix | Delete
case 7 /* Punctuator */:
[4511] Fix | Delete
start = (value === '[') || (value === '(') || (value === '{') ||
[4512] Fix | Delete
(value === '+') || (value === '-') ||
[4513] Fix | Delete
(value === '!') || (value === '~') ||
[4514] Fix | Delete
(value === '++') || (value === '--') ||
[4515] Fix | Delete
(value === '/') || (value === '/='); // regular expression literal
[4516] Fix | Delete
break;
[4517] Fix | Delete
case 4 /* Keyword */:
[4518] Fix | Delete
start = (value === 'class') || (value === 'delete') ||
[4519] Fix | Delete
(value === 'function') || (value === 'let') || (value === 'new') ||
[4520] Fix | Delete
(value === 'super') || (value === 'this') || (value === 'typeof') ||
[4521] Fix | Delete
(value === 'void') || (value === 'yield');
[4522] Fix | Delete
break;
[4523] Fix | Delete
default:
[4524] Fix | Delete
break;
[4525] Fix | Delete
}
[4526] Fix | Delete
return start;
[4527] Fix | Delete
};
[4528] Fix | Delete
Parser.prototype.parseYieldExpression = function () {
[4529] Fix | Delete
var node = this.createNode();
[4530] Fix | Delete
this.expectKeyword('yield');
[4531] Fix | Delete
var argument = null;
[4532] Fix | Delete
var delegate = false;
[4533] Fix | Delete
if (!this.hasLineTerminator) {
[4534] Fix | Delete
var previousAllowYield = this.context.allowYield;
[4535] Fix | Delete
this.context.allowYield = false;
[4536] Fix | Delete
delegate = this.match('*');
[4537] Fix | Delete
if (delegate) {
[4538] Fix | Delete
this.nextToken();
[4539] Fix | Delete
argument = this.parseAssignmentExpression();
[4540] Fix | Delete
}
[4541] Fix | Delete
else if (this.isStartOfExpression()) {
[4542] Fix | Delete
argument = this.parseAssignmentExpression();
[4543] Fix | Delete
}
[4544] Fix | Delete
this.context.allowYield = previousAllowYield;
[4545] Fix | Delete
}
[4546] Fix | Delete
return this.finalize(node, new Node.YieldExpression(argument, delegate));
[4547] Fix | Delete
};
[4548] Fix | Delete
// https://tc39.github.io/ecma262/#sec-class-definitions
[4549] Fix | Delete
Parser.prototype.parseClassElement = function (hasConstructor) {
[4550] Fix | Delete
var token = this.lookahead;
[4551] Fix | Delete
var node = this.createNode();
[4552] Fix | Delete
var kind = '';
[4553] Fix | Delete
var key = null;
[4554] Fix | Delete
var value = null;
[4555] Fix | Delete
var computed = false;
[4556] Fix | Delete
var method = false;
[4557] Fix | Delete
var isStatic = false;
[4558] Fix | Delete
var isAsync = false;
[4559] Fix | Delete
if (this.match('*')) {
[4560] Fix | Delete
this.nextToken();
[4561] Fix | Delete
}
[4562] Fix | Delete
else {
[4563] Fix | Delete
computed = this.match('[');
[4564] Fix | Delete
key = this.parseObjectPropertyKey();
[4565] Fix | Delete
var id = key;
[4566] Fix | Delete
if (id.name === 'static' && (this.qualifiedPropertyName(this.lookahead) || this.match('*'))) {
[4567] Fix | Delete
token = this.lookahead;
[4568] Fix | Delete
isStatic = true;
[4569] Fix | Delete
computed = this.match('[');
[4570] Fix | Delete
if (this.match('*')) {
[4571] Fix | Delete
this.nextToken();
[4572] Fix | Delete
}
[4573] Fix | Delete
else {
[4574] Fix | Delete
key = this.parseObjectPropertyKey();
[4575] Fix | Delete
}
[4576] Fix | Delete
}
[4577] Fix | Delete
if ((token.type === 3 /* Identifier */) && !this.hasLineTerminator && (token.value === 'async')) {
[4578] Fix | Delete
var punctuator = this.lookahead.value;
[4579] Fix | Delete
if (punctuator !== ':' && punctuator !== '(' && punctuator !== '*') {
[4580] Fix | Delete
isAsync = true;
[4581] Fix | Delete
token = this.lookahead;
[4582] Fix | Delete
key = this.parseObjectPropertyKey();
[4583] Fix | Delete
if (token.type === 3 /* Identifier */) {
[4584] Fix | Delete
if (token.value === 'get' || token.value === 'set') {
[4585] Fix | Delete
this.tolerateUnexpectedToken(token);
[4586] Fix | Delete
}
[4587] Fix | Delete
else if (token.value === 'constructor') {
[4588] Fix | Delete
this.tolerateUnexpectedToken(token, messages_1.Messages.ConstructorIsAsync);
[4589] Fix | Delete
}
[4590] Fix | Delete
}
[4591] Fix | Delete
}
[4592] Fix | Delete
}
[4593] Fix | Delete
}
[4594] Fix | Delete
var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
[4595] Fix | Delete
if (token.type === 3 /* Identifier */) {
[4596] Fix | Delete
if (token.value === 'get' && lookaheadPropertyKey) {
[4597] Fix | Delete
kind = 'get';
[4598] Fix | Delete
computed = this.match('[');
[4599] Fix | Delete
key = this.parseObjectPropertyKey();
[4600] Fix | Delete
this.context.allowYield = false;
[4601] Fix | Delete
value = this.parseGetterMethod();
[4602] Fix | Delete
}
[4603] Fix | Delete
else if (token.value === 'set' && lookaheadPropertyKey) {
[4604] Fix | Delete
kind = 'set';
[4605] Fix | Delete
computed = this.match('[');
[4606] Fix | Delete
key = this.parseObjectPropertyKey();
[4607] Fix | Delete
value = this.parseSetterMethod();
[4608] Fix | Delete
}
[4609] Fix | Delete
}
[4610] Fix | Delete
else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) {
[4611] Fix | Delete
kind = 'init';
[4612] Fix | Delete
computed = this.match('[');
[4613] Fix | Delete
key = this.parseObjectPropertyKey();
[4614] Fix | Delete
value = this.parseGeneratorMethod();
[4615] Fix | Delete
method = true;
[4616] Fix | Delete
}
[4617] Fix | Delete
if (!kind && key && this.match('(')) {
[4618] Fix | Delete
kind = 'init';
[4619] Fix | Delete
value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();
[4620] Fix | Delete
method = true;
[4621] Fix | Delete
}
[4622] Fix | Delete
if (!kind) {
[4623] Fix | Delete
this.throwUnexpectedToken(this.lookahead);
[4624] Fix | Delete
}
[4625] Fix | Delete
if (kind === 'init') {
[4626] Fix | Delete
kind = 'method';
[4627] Fix | Delete
}
[4628] Fix | Delete
if (!computed) {
[4629] Fix | Delete
if (isStatic && this.isPropertyKey(key, 'prototype')) {
[4630] Fix | Delete
this.throwUnexpectedToken(token, messages_1.Messages.StaticPrototype);
[4631] Fix | Delete
}
[4632] Fix | Delete
if (!isStatic && this.isPropertyKey(key, 'constructor')) {
[4633] Fix | Delete
if (kind !== 'method' || !method || (value && value.generator)) {
[4634] Fix | Delete
this.throwUnexpectedToken(token, messages_1.Messages.ConstructorSpecialMethod);
[4635] Fix | Delete
}
[4636] Fix | Delete
if (hasConstructor.value) {
[4637] Fix | Delete
this.throwUnexpectedToken(token, messages_1.Messages.DuplicateConstructor);
[4638] Fix | Delete
}
[4639] Fix | Delete
else {
[4640] Fix | Delete
hasConstructor.value = true;
[4641] Fix | Delete
}
[4642] Fix | Delete
kind = 'constructor';
[4643] Fix | Delete
}
[4644] Fix | Delete
}
[4645] Fix | Delete
return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic));
[4646] Fix | Delete
};
[4647] Fix | Delete
Parser.prototype.parseClassElementList = function () {
[4648] Fix | Delete
var body = [];
[4649] Fix | Delete
var hasConstructor = { value: false };
[4650] Fix | Delete
this.expect('{');
[4651] Fix | Delete
while (!this.match('}')) {
[4652] Fix | Delete
if (this.match(';')) {
[4653] Fix | Delete
this.nextToken();
[4654] Fix | Delete
}
[4655] Fix | Delete
else {
[4656] Fix | Delete
body.push(this.parseClassElement(hasConstructor));
[4657] Fix | Delete
}
[4658] Fix | Delete
}
[4659] Fix | Delete
this.expect('}');
[4660] Fix | Delete
return body;
[4661] Fix | Delete
};
[4662] Fix | Delete
Parser.prototype.parseClassBody = function () {
[4663] Fix | Delete
var node = this.createNode();
[4664] Fix | Delete
var elementList = this.parseClassElementList();
[4665] Fix | Delete
return this.finalize(node, new Node.ClassBody(elementList));
[4666] Fix | Delete
};
[4667] Fix | Delete
Parser.prototype.parseClassDeclaration = function (identifierIsOptional) {
[4668] Fix | Delete
var node = this.createNode();
[4669] Fix | Delete
var previousStrict = this.context.strict;
[4670] Fix | Delete
this.context.strict = true;
[4671] Fix | Delete
this.expectKeyword('class');
[4672] Fix | Delete
var id = (identifierIsOptional && (this.lookahead.type !== 3 /* Identifier */)) ? null : this.parseVariableIdentifier();
[4673] Fix | Delete
var superClass = null;
[4674] Fix | Delete
if (this.matchKeyword('extends')) {
[4675] Fix | Delete
this.nextToken();
[4676] Fix | Delete
superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
[4677] Fix | Delete
}
[4678] Fix | Delete
var classBody = this.parseClassBody();
[4679] Fix | Delete
this.context.strict = previousStrict;
[4680] Fix | Delete
return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody));
[4681] Fix | Delete
};
[4682] Fix | Delete
Parser.prototype.parseClassExpression = function () {
[4683] Fix | Delete
var node = this.createNode();
[4684] Fix | Delete
var previousStrict = this.context.strict;
[4685] Fix | Delete
this.context.strict = true;
[4686] Fix | Delete
this.expectKeyword('class');
[4687] Fix | Delete
var id = (this.lookahead.type === 3 /* Identifier */) ? this.parseVariableIdentifier() : null;
[4688] Fix | Delete
var superClass = null;
[4689] Fix | Delete
if (this.matchKeyword('extends')) {
[4690] Fix | Delete
this.nextToken();
[4691] Fix | Delete
superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
[4692] Fix | Delete
}
[4693] Fix | Delete
var classBody = this.parseClassBody();
[4694] Fix | Delete
this.context.strict = previousStrict;
[4695] Fix | Delete
return this.finalize(node, new Node.ClassExpression(id, superClass, classBody));
[4696] Fix | Delete
};
[4697] Fix | Delete
// https://tc39.github.io/ecma262/#sec-scripts
[4698] Fix | Delete
// https://tc39.github.io/ecma262/#sec-modules
[4699] Fix | Delete
Parser.prototype.parseModule = function () {
[4700] Fix | Delete
this.context.strict = true;
[4701] Fix | Delete
this.context.isModule = true;
[4702] Fix | Delete
var node = this.createNode();
[4703] Fix | Delete
var body = this.parseDirectivePrologues();
[4704] Fix | Delete
while (this.lookahead.type !== 2 /* EOF */) {
[4705] Fix | Delete
body.push(this.parseStatementListItem());
[4706] Fix | Delete
}
[4707] Fix | Delete
return this.finalize(node, new Node.Module(body));
[4708] Fix | Delete
};
[4709] Fix | Delete
Parser.prototype.parseScript = function () {
[4710] Fix | Delete
var node = this.createNode();
[4711] Fix | Delete
var body = this.parseDirectivePrologues();
[4712] Fix | Delete
while (this.lookahead.type !== 2 /* EOF */) {
[4713] Fix | Delete
body.push(this.parseStatementListItem());
[4714] Fix | Delete
}
[4715] Fix | Delete
return this.finalize(node, new Node.Script(body));
[4716] Fix | Delete
};
[4717] Fix | Delete
// https://tc39.github.io/ecma262/#sec-imports
[4718] Fix | Delete
Parser.prototype.parseModuleSpecifier = function () {
[4719] Fix | Delete
var node = this.createNode();
[4720] Fix | Delete
if (this.lookahead.type !== 8 /* StringLiteral */) {
[4721] Fix | Delete
this.throwError(messages_1.Messages.InvalidModuleSpecifier);
[4722] Fix | Delete
}
[4723] Fix | Delete
var token = this.nextToken();
[4724] Fix | Delete
var raw = this.getTokenRaw(token);
[4725] Fix | Delete
return this.finalize(node, new Node.Literal(token.value, raw));
[4726] Fix | Delete
};
[4727] Fix | Delete
// import {<foo as bar>} ...;
[4728] Fix | Delete
Parser.prototype.parseImportSpecifier = function () {
[4729] Fix | Delete
var node = this.createNode();
[4730] Fix | Delete
var imported;
[4731] Fix | Delete
var local;
[4732] Fix | Delete
if (this.lookahead.type === 3 /* Identifier */) {
[4733] Fix | Delete
imported = this.parseVariableIdentifier();
[4734] Fix | Delete
local = imported;
[4735] Fix | Delete
if (this.matchContextualKeyword('as')) {
[4736] Fix | Delete
this.nextToken();
[4737] Fix | Delete
local = this.parseVariableIdentifier();
[4738] Fix | Delete
}
[4739] Fix | Delete
}
[4740] Fix | Delete
else {
[4741] Fix | Delete
imported = this.parseIdentifierName();
[4742] Fix | Delete
local = imported;
[4743] Fix | Delete
if (this.matchContextualKeyword('as')) {
[4744] Fix | Delete
this.nextToken();
[4745] Fix | Delete
local = this.parseVariableIdentifier();
[4746] Fix | Delete
}
[4747] Fix | Delete
else {
[4748] Fix | Delete
this.throwUnexpectedToken(this.nextToken());
[4749] Fix | Delete
}
[4750] Fix | Delete
}
[4751] Fix | Delete
return this.finalize(node, new Node.ImportSpecifier(local, imported));
[4752] Fix | Delete
};
[4753] Fix | Delete
// {foo, bar as bas}
[4754] Fix | Delete
Parser.prototype.parseNamedImports = function () {
[4755] Fix | Delete
this.expect('{');
[4756] Fix | Delete
var specifiers = [];
[4757] Fix | Delete
while (!this.match('}')) {
[4758] Fix | Delete
specifiers.push(this.parseImportSpecifier());
[4759] Fix | Delete
if (!this.match('}')) {
[4760] Fix | Delete
this.expect(',');
[4761] Fix | Delete
}
[4762] Fix | Delete
}
[4763] Fix | Delete
this.expect('}');
[4764] Fix | Delete
return specifiers;
[4765] Fix | Delete
};
[4766] Fix | Delete
// import <foo> ...;
[4767] Fix | Delete
Parser.prototype.parseImportDefaultSpecifier = function () {
[4768] Fix | Delete
var node = this.createNode();
[4769] Fix | Delete
var local = this.parseIdentifierName();
[4770] Fix | Delete
return this.finalize(node, new Node.ImportDefaultSpecifier(local));
[4771] Fix | Delete
};
[4772] Fix | Delete
// import <* as foo> ...;
[4773] Fix | Delete
Parser.prototype.parseImportNamespaceSpecifier = function () {
[4774] Fix | Delete
var node = this.createNode();
[4775] Fix | Delete
this.expect('*');
[4776] Fix | Delete
if (!this.matchContextualKeyword('as')) {
[4777] Fix | Delete
this.throwError(messages_1.Messages.NoAsAfterImportNamespace);
[4778] Fix | Delete
}
[4779] Fix | Delete
this.nextToken();
[4780] Fix | Delete
var local = this.parseIdentifierName();
[4781] Fix | Delete
return this.finalize(node, new Node.ImportNamespaceSpecifier(local));
[4782] Fix | Delete
};
[4783] Fix | Delete
Parser.prototype.parseImportDeclaration = function () {
[4784] Fix | Delete
if (this.context.inFunctionBody) {
[4785] Fix | Delete
this.throwError(messages_1.Messages.IllegalImportDeclaration);
[4786] Fix | Delete
}
[4787] Fix | Delete
var node = this.createNode();
[4788] Fix | Delete
this.expectKeyword('import');
[4789] Fix | Delete
var src;
[4790] Fix | Delete
var specifiers = [];
[4791] Fix | Delete
if (this.lookahead.type === 8 /* StringLiteral */) {
[4792] Fix | Delete
// import 'foo';
[4793] Fix | Delete
src = this.parseModuleSpecifier();
[4794] Fix | Delete
}
[4795] Fix | Delete
else {
[4796] Fix | Delete
if (this.match('{')) {
[4797] Fix | Delete
// import {bar}
[4798] Fix | Delete
specifiers = specifiers.concat(this.parseNamedImports());
[4799] Fix | Delete
}
[4800] Fix | Delete
else if (this.match('*')) {
[4801] Fix | Delete
// import * as foo
[4802] Fix | Delete
specifiers.push(this.parseImportNamespaceSpecifier());
[4803] Fix | Delete
}
[4804] Fix | Delete
else if (this.isIdentifierName(this.lookahead) && !this.matchKeyword('default')) {
[4805] Fix | Delete
// import foo
[4806] Fix | Delete
specifiers.push(this.parseImportDefaultSpecifier());
[4807] Fix | Delete
if (this.match(',')) {
[4808] Fix | Delete
this.nextToken();
[4809] Fix | Delete
if (this.match('*')) {
[4810] Fix | Delete
// import foo, * as foo
[4811] Fix | Delete
specifiers.push(this.parseImportNamespaceSpecifier());
[4812] Fix | Delete
}
[4813] Fix | Delete
else if (this.match('{')) {
[4814] Fix | Delete
// import foo, {bar}
[4815] Fix | Delete
specifiers = specifiers.concat(this.parseNamedImports());
[4816] Fix | Delete
}
[4817] Fix | Delete
else {
[4818] Fix | Delete
this.throwUnexpectedToken(this.lookahead);
[4819] Fix | Delete
}
[4820] Fix | Delete
}
[4821] Fix | Delete
}
[4822] Fix | Delete
else {
[4823] Fix | Delete
this.throwUnexpectedToken(this.nextToken());
[4824] Fix | Delete
}
[4825] Fix | Delete
if (!this.matchContextualKeyword('from')) {
[4826] Fix | Delete
var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
[4827] Fix | Delete
this.throwError(message, this.lookahead.value);
[4828] Fix | Delete
}
[4829] Fix | Delete
this.nextToken();
[4830] Fix | Delete
src = this.parseModuleSpecifier();
[4831] Fix | Delete
}
[4832] Fix | Delete
this.consumeSemicolon();
[4833] Fix | Delete
return this.finalize(node, new Node.ImportDeclaration(specifiers, src));
[4834] Fix | Delete
};
[4835] Fix | Delete
// https://tc39.github.io/ecma262/#sec-exports
[4836] Fix | Delete
Parser.prototype.parseExportSpecifier = function () {
[4837] Fix | Delete
var node = this.createNode();
[4838] Fix | Delete
var local = this.parseIdentifierName();
[4839] Fix | Delete
var exported = local;
[4840] Fix | Delete
if (this.matchContextualKeyword('as')) {
[4841] Fix | Delete
this.nextToken();
[4842] Fix | Delete
exported = this.parseIdentifierName();
[4843] Fix | Delete
}
[4844] Fix | Delete
return this.finalize(node, new Node.ExportSpecifier(local, exported));
[4845] Fix | Delete
};
[4846] Fix | Delete
Parser.prototype.parseExportDeclaration = function () {
[4847] Fix | Delete
if (this.context.inFunctionBody) {
[4848] Fix | Delete
this.throwError(messages_1.Messages.IllegalExportDeclaration);
[4849] Fix | Delete
}
[4850] Fix | Delete
var node = this.createNode();
[4851] Fix | Delete
this.expectKeyword('export');
[4852] Fix | Delete
var exportDeclaration;
[4853] Fix | Delete
if (this.matchKeyword('default')) {
[4854] Fix | Delete
// export default ...
[4855] Fix | Delete
this.nextToken();
[4856] Fix | Delete
if (this.matchKeyword('function')) {
[4857] Fix | Delete
// export default function foo () {}
[4858] Fix | Delete
// export default function () {}
[4859] Fix | Delete
var declaration = this.parseFunctionDeclaration(true);
[4860] Fix | Delete
exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
[4861] Fix | Delete
}
[4862] Fix | Delete
else if (this.matchKeyword('class')) {
[4863] Fix | Delete
// export default class foo {}
[4864] Fix | Delete
var declaration = this.parseClassDeclaration(true);
[4865] Fix | Delete
exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
[4866] Fix | Delete
}
[4867] Fix | Delete
else if (this.matchContextualKeyword('async')) {
[4868] Fix | Delete
// export default async function f () {}
[4869] Fix | Delete
// export default async function () {}
[4870] Fix | Delete
// export default async x => x
[4871] Fix | Delete
var declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression();
[4872] Fix | Delete
exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
[4873] Fix | Delete
}
[4874] Fix | Delete
else {
[4875] Fix | Delete
if (this.matchContextualKeyword('from')) {
[4876] Fix | Delete
this.throwError(messages_1.Messages.UnexpectedToken, this.lookahead.value);
[4877] Fix | Delete
}
[4878] Fix | Delete
// export default {};
[4879] Fix | Delete
// export default [];
[4880] Fix | Delete
// export default (1 + 2);
[4881] Fix | Delete
var declaration = this.match('{') ? this.parseObjectInitializer() :
[4882] Fix | Delete
this.match('[') ? this.parseArrayInitializer() : this.parseAssignmentExpression();
[4883] Fix | Delete
this.consumeSemicolon();
[4884] Fix | Delete
exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
[4885] Fix | Delete
}
[4886] Fix | Delete
}
[4887] Fix | Delete
else if (this.match('*')) {
[4888] Fix | Delete
// export * from 'foo';
[4889] Fix | Delete
this.nextToken();
[4890] Fix | Delete
if (!this.matchContextualKeyword('from')) {
[4891] Fix | Delete
var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
[4892] Fix | Delete
this.throwError(message, this.lookahead.value);
[4893] Fix | Delete
}
[4894] Fix | Delete
this.nextToken();
[4895] Fix | Delete
var src = this.parseModuleSpecifier();
[4896] Fix | Delete
this.consumeSemicolon();
[4897] Fix | Delete
exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src));
[4898] Fix | Delete
}
[4899] Fix | Delete
else if (this.lookahead.type === 4 /* Keyword */) {
[4900] Fix | Delete
// export var f = 1;
[4901] Fix | Delete
var declaration = void 0;
[4902] Fix | Delete
switch (this.lookahead.value) {
[4903] Fix | Delete
case 'let':
[4904] Fix | Delete
case 'const':
[4905] Fix | Delete
declaration = this.parseLexicalDeclaration({ inFor: false });
[4906] Fix | Delete
break;
[4907] Fix | Delete
case 'var':
[4908] Fix | Delete
case 'class':
[4909] Fix | Delete
case 'function':
[4910] Fix | Delete
declaration = this.parseStatementListItem();
[4911] Fix | Delete
break;
[4912] Fix | Delete
default:
[4913] Fix | Delete
this.throwUnexpectedToken(this.lookahead);
[4914] Fix | Delete
}
[4915] Fix | Delete
exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null));
[4916] Fix | Delete
}
[4917] Fix | Delete
else if (this.matchAsyncFunction()) {
[4918] Fix | Delete
var declaration = this.parseFunctionDeclaration();
[4919] Fix | Delete
exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null));
[4920] Fix | Delete
}
[4921] Fix | Delete
else {
[4922] Fix | Delete
var specifiers = [];
[4923] Fix | Delete
var source = null;
[4924] Fix | Delete
var isExportFromIdentifier = false;
[4925] Fix | Delete
this.expect('{');
[4926] Fix | Delete
while (!this.match('}')) {
[4927] Fix | Delete
isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword('default');
[4928] Fix | Delete
specifiers.push(this.parseExportSpecifier());
[4929] Fix | Delete
if (!this.match('}')) {
[4930] Fix | Delete
this.expect(',');
[4931] Fix | Delete
}
[4932] Fix | Delete
}
[4933] Fix | Delete
this.expect('}');
[4934] Fix | Delete
if (this.matchContextualKeyword('from')) {
[4935] Fix | Delete
// export {default} from 'foo';
[4936] Fix | Delete
// export {foo} from 'foo';
[4937] Fix | Delete
this.nextToken();
[4938] Fix | Delete
source = this.parseModuleSpecifier();
[4939] Fix | Delete
this.consumeSemicolon();
[4940] Fix | Delete
}
[4941] Fix | Delete
else if (isExportFromIdentifier) {
[4942] Fix | Delete
// export {default}; // missing fromClause
[4943] Fix | Delete
var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
[4944] Fix | Delete
this.throwError(message, this.lookahead.value);
[4945] Fix | Delete
}
[4946] Fix | Delete
else {
[4947] Fix | Delete
// export {foo};
[4948] Fix | Delete
this.consumeSemicolon();
[4949] Fix | Delete
}
[4950] Fix | Delete
exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source));
[4951] Fix | Delete
}
[4952] Fix | Delete
return exportDeclaration;
[4953] Fix | Delete
};
[4954] Fix | Delete
return Parser;
[4955] Fix | Delete
}());
[4956] Fix | Delete
exports.Parser = Parser;
[4957] Fix | Delete
[4958] Fix | Delete
[4959] Fix | Delete
/***/ },
[4960] Fix | Delete
/* 9 */
[4961] Fix | Delete
/***/ function(module, exports) {
[4962] Fix | Delete
[4963] Fix | Delete
"use strict";
[4964] Fix | Delete
// Ensure the condition is true, otherwise throw an error.
[4965] Fix | Delete
// This is only to have a better contract semantic, i.e. another safety net
[4966] Fix | Delete
// to catch a logic error. The condition shall be fulfilled in normal case.
[4967] Fix | Delete
// Do NOT use this to enforce a certain condition on any user input.
[4968] Fix | Delete
Object.defineProperty(exports, "__esModule", { value: true });
[4969] Fix | Delete
function assert(condition, message) {
[4970] Fix | Delete
/* istanbul ignore if */
[4971] Fix | Delete
if (!condition) {
[4972] Fix | Delete
throw new Error('ASSERT: ' + message);
[4973] Fix | Delete
}
[4974] Fix | Delete
}
[4975] Fix | Delete
exports.assert = assert;
[4976] Fix | Delete
[4977] Fix | Delete
[4978] Fix | Delete
/***/ },
[4979] Fix | Delete
/* 10 */
[4980] Fix | Delete
/***/ function(module, exports) {
[4981] Fix | Delete
[4982] Fix | Delete
"use strict";
[4983] Fix | Delete
/* tslint:disable:max-classes-per-file */
[4984] Fix | Delete
Object.defineProperty(exports, "__esModule", { value: true });
[4985] Fix | Delete
var ErrorHandler = (function () {
[4986] Fix | Delete
function ErrorHandler() {
[4987] Fix | Delete
this.errors = [];
[4988] Fix | Delete
this.tolerant = false;
[4989] Fix | Delete
}
[4990] Fix | Delete
ErrorHandler.prototype.recordError = function (error) {
[4991] Fix | Delete
this.errors.push(error);
[4992] Fix | Delete
};
[4993] Fix | Delete
ErrorHandler.prototype.tolerate = function (error) {
[4994] Fix | Delete
if (this.tolerant) {
[4995] Fix | Delete
this.recordError(error);
[4996] Fix | Delete
}
[4997] Fix | Delete
else {
[4998] Fix | Delete
throw error;
[4999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function