Update LKG

This commit is contained in:
Kanchalai Tanglertsampan
2017-06-08 14:13:17 -07:00
parent 4a6ae58a6f
commit a796817dd3
5 changed files with 70 additions and 26 deletions
+6 -4
View File
@@ -13418,7 +13418,9 @@ var ts;
}
ts.isExternalModule = isExternalModule;
function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) {
return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
var newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
newSourceFile.flags |= (sourceFile.flags & 524288);
return newSourceFile;
}
ts.updateSourceFile = updateSourceFile;
function parseIsolatedJSDocComment(content, start, length) {
@@ -48812,14 +48814,14 @@ var ts;
}
function visitImportCallExpression(node) {
switch (compilerOptions.module) {
case ts.ModuleKind.CommonJS:
return transformImportCallExpressionCommonJS(node);
case ts.ModuleKind.AMD:
return transformImportCallExpressionAMD(node);
case ts.ModuleKind.UMD:
return transformImportCallExpressionUMD(node);
case ts.ModuleKind.CommonJS:
default:
return transformImportCallExpressionCommonJS(node);
}
ts.Debug.fail("All supported module kind in this transformation step should have been handled");
}
function transformImportCallExpressionUMD(node) {
needUMDDynamicImportHelper = true;
+14 -5
View File
@@ -15255,7 +15255,9 @@ var ts;
}
ts.isExternalModule = isExternalModule;
function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) {
return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
var newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
newSourceFile.flags |= (sourceFile.flags & 524288);
return newSourceFile;
}
ts.updateSourceFile = updateSourceFile;
function parseIsolatedJSDocComment(content, start, length) {
@@ -50162,14 +50164,14 @@ var ts;
}
function visitImportCallExpression(node) {
switch (compilerOptions.module) {
case ts.ModuleKind.CommonJS:
return transformImportCallExpressionCommonJS(node);
case ts.ModuleKind.AMD:
return transformImportCallExpressionAMD(node);
case ts.ModuleKind.UMD:
return transformImportCallExpressionUMD(node);
case ts.ModuleKind.CommonJS:
default:
return transformImportCallExpressionCommonJS(node);
}
ts.Debug.fail("All supported module kind in this transformation step should have been handled");
}
function transformImportCallExpressionUMD(node) {
needUMDDynamicImportHelper = true;
@@ -67631,7 +67633,14 @@ var ts;
var token = ts.scanner.getToken();
if (token === 91) {
token = nextToken();
if (token === 9) {
if (token === 19) {
token = nextToken();
if (token === 9) {
recordModuleName();
return true;
}
}
else if (token === 9) {
recordModuleName();
return true;
}
+14 -5
View File
@@ -16646,7 +16646,9 @@ var ts;
}
ts.isExternalModule = isExternalModule;
function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) {
return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
var newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
newSourceFile.flags |= (sourceFile.flags & 524288);
return newSourceFile;
}
ts.updateSourceFile = updateSourceFile;
function parseIsolatedJSDocComment(content, start, length) {
@@ -51553,14 +51555,14 @@ var ts;
}
function visitImportCallExpression(node) {
switch (compilerOptions.module) {
case ts.ModuleKind.CommonJS:
return transformImportCallExpressionCommonJS(node);
case ts.ModuleKind.AMD:
return transformImportCallExpressionAMD(node);
case ts.ModuleKind.UMD:
return transformImportCallExpressionUMD(node);
case ts.ModuleKind.CommonJS:
default:
return transformImportCallExpressionCommonJS(node);
}
ts.Debug.fail("All supported module kind in this transformation step should have been handled");
}
function transformImportCallExpressionUMD(node) {
needUMDDynamicImportHelper = true;
@@ -67631,7 +67633,14 @@ var ts;
var token = ts.scanner.getToken();
if (token === 91) {
token = nextToken();
if (token === 9) {
if (token === 19) {
token = nextToken();
if (token === 9) {
recordModuleName();
return true;
}
}
else if (token === 9) {
recordModuleName();
return true;
}
+18 -6
View File
@@ -16301,7 +16301,11 @@ var ts;
// becoming detached from any SourceFile). It is recommended that this SourceFile not
// be used once 'update' is called on it.
function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) {
return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
var newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
// Because new source file node is created, it may not have the flag PossiblyContainDynamicImport. This is the case if there is no new edit to add dynamic import.
// We will manually port the flag to the new source file.
newSourceFile.flags |= (sourceFile.flags & 524288 /* PossiblyContainDynamicImport */);
return newSourceFile;
}
ts.updateSourceFile = updateSourceFile;
/* @internal */
@@ -61069,14 +61073,14 @@ var ts;
}
function visitImportCallExpression(node) {
switch (compilerOptions.module) {
case ts.ModuleKind.CommonJS:
return transformImportCallExpressionCommonJS(node);
case ts.ModuleKind.AMD:
return transformImportCallExpressionAMD(node);
case ts.ModuleKind.UMD:
return transformImportCallExpressionUMD(node);
case ts.ModuleKind.CommonJS:
default:
return transformImportCallExpressionCommonJS(node);
}
ts.Debug.fail("All supported module kind in this transformation step should have been handled");
}
function transformImportCallExpressionUMD(node) {
// (function (factory) {
@@ -81521,7 +81525,15 @@ var ts;
var token = ts.scanner.getToken();
if (token === 91 /* ImportKeyword */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
if (token === 19 /* OpenParenToken */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
// import("mod");
recordModuleName();
return true;
}
}
else if (token === 9 /* StringLiteral */) {
// import "mod";
recordModuleName();
return true;
@@ -81705,7 +81717,7 @@ var ts;
// import * as NS from "mod"
// import d, {a, b as B} from "mod"
// import i = require("mod");
//
// import("mod");
// export * from "mod"
// export {a as b} from "mod"
// export import i = require("mod")
+18 -6
View File
@@ -16301,7 +16301,11 @@ var ts;
// becoming detached from any SourceFile). It is recommended that this SourceFile not
// be used once 'update' is called on it.
function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) {
return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
var newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
// Because new source file node is created, it may not have the flag PossiblyContainDynamicImport. This is the case if there is no new edit to add dynamic import.
// We will manually port the flag to the new source file.
newSourceFile.flags |= (sourceFile.flags & 524288 /* PossiblyContainDynamicImport */);
return newSourceFile;
}
ts.updateSourceFile = updateSourceFile;
/* @internal */
@@ -61069,14 +61073,14 @@ var ts;
}
function visitImportCallExpression(node) {
switch (compilerOptions.module) {
case ts.ModuleKind.CommonJS:
return transformImportCallExpressionCommonJS(node);
case ts.ModuleKind.AMD:
return transformImportCallExpressionAMD(node);
case ts.ModuleKind.UMD:
return transformImportCallExpressionUMD(node);
case ts.ModuleKind.CommonJS:
default:
return transformImportCallExpressionCommonJS(node);
}
ts.Debug.fail("All supported module kind in this transformation step should have been handled");
}
function transformImportCallExpressionUMD(node) {
// (function (factory) {
@@ -81521,7 +81525,15 @@ var ts;
var token = ts.scanner.getToken();
if (token === 91 /* ImportKeyword */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
if (token === 19 /* OpenParenToken */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
// import("mod");
recordModuleName();
return true;
}
}
else if (token === 9 /* StringLiteral */) {
// import "mod";
recordModuleName();
return true;
@@ -81705,7 +81717,7 @@ var ts;
// import * as NS from "mod"
// import d, {a, b as B} from "mod"
// import i = require("mod");
//
// import("mod");
// export * from "mod"
// export {a as b} from "mod"
// export import i = require("mod")