mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Address PR feedback
This commit is contained in:
@@ -10911,9 +10911,11 @@ module ts {
|
||||
getSymbolDisplayBuilder().buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags);
|
||||
}
|
||||
|
||||
function isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean {
|
||||
function isUnknownIdentifier(location: Node, name: string): boolean {
|
||||
// Do not call resolveName on a synthesized node!
|
||||
Debug.assert(!nodeIsSynthesized(location), "isUnknownIdentifier called with a synthesized location");
|
||||
return !resolveName(location, name, SymbolFlags.Value, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined) &&
|
||||
!hasProperty(getGeneratedNamesForSourceFile(sourceFile), name);
|
||||
!hasProperty(getGeneratedNamesForSourceFile(getSourceFile(location)), name);
|
||||
}
|
||||
|
||||
function getBlockScopedVariableId(n: Identifier): number {
|
||||
|
||||
+47
-36
@@ -1641,14 +1641,13 @@ module ts {
|
||||
}
|
||||
|
||||
if (root) {
|
||||
currentSourceFile = root;
|
||||
emit(root);
|
||||
// Do not call emit directly. It does not set the currentSourceFile.
|
||||
emitSourceFile(root);
|
||||
}
|
||||
else {
|
||||
forEach(host.getSourceFiles(), sourceFile => {
|
||||
currentSourceFile = sourceFile;
|
||||
if (!isExternalModuleOrDeclarationFile(sourceFile)) {
|
||||
emit(sourceFile);
|
||||
emitSourceFile(sourceFile);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1657,6 +1656,11 @@ module ts {
|
||||
writeEmittedFiles(writer.getText(), /*writeByteOrderMark*/ compilerOptions.emitBOM);
|
||||
return;
|
||||
|
||||
function emitSourceFile(sourceFile: SourceFile): void {
|
||||
currentSourceFile = sourceFile;
|
||||
emit(sourceFile);
|
||||
}
|
||||
|
||||
// enters the new lexical environment
|
||||
// return value should be passed to matching call to exitNameScope.
|
||||
function enterNameScope(): boolean {
|
||||
@@ -1689,10 +1693,10 @@ module ts {
|
||||
name = generateUniqueName(baseName, n => isExistingName(location, n));
|
||||
}
|
||||
|
||||
return putNameInCurrentScopeNames(name);
|
||||
return recordNameInCurrentScope(name);
|
||||
}
|
||||
|
||||
function putNameInCurrentScopeNames(name: string): string {
|
||||
function recordNameInCurrentScope(name: string): string {
|
||||
if (!currentScopeNames) {
|
||||
currentScopeNames = {};
|
||||
}
|
||||
@@ -1702,7 +1706,7 @@ module ts {
|
||||
|
||||
function isExistingName(location: Node, name: string) {
|
||||
// check if resolver is aware of this name (if name was seen during the typecheck)
|
||||
if (!resolver.isUnknownIdentifier(location, name, currentSourceFile)) {
|
||||
if (!resolver.isUnknownIdentifier(location, name)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2107,13 +2111,14 @@ module ts {
|
||||
break;
|
||||
}
|
||||
// _a .. _h, _j ... _z, _0, _1, ...
|
||||
// Note that _i is skipped
|
||||
name = "_" + (tempCount < 25 ? String.fromCharCode(tempCount + (tempCount < 8 ? 0 : 1) + CharacterCodes.a) : tempCount - 25);
|
||||
tempCount++;
|
||||
}
|
||||
|
||||
// This is necessary so that a name generated via renameNonTopLevelLetAndConst will see the name
|
||||
// we just generated.
|
||||
putNameInCurrentScopeNames(name);
|
||||
recordNameInCurrentScope(name);
|
||||
|
||||
var result = <Identifier>createSynthesizedNode(SyntaxKind.Identifier);
|
||||
result.text = name;
|
||||
@@ -3315,7 +3320,7 @@ module ts {
|
||||
function emitBinaryExpression(node: BinaryExpression) {
|
||||
if (languageVersion < ScriptTarget.ES6 && node.operatorToken.kind === SyntaxKind.EqualsToken &&
|
||||
(node.left.kind === SyntaxKind.ObjectLiteralExpression || node.left.kind === SyntaxKind.ArrayLiteralExpression)) {
|
||||
emitDestructuring(node);
|
||||
emitDestructuring(node, node.parent.kind === SyntaxKind.ExpressionStatement);
|
||||
}
|
||||
else {
|
||||
emit(node.left);
|
||||
@@ -3595,7 +3600,7 @@ module ts {
|
||||
|
||||
// Do not emit the LHS var declaration yet, because it might contain destructuring.
|
||||
|
||||
// Do not call create recordTempDeclaration because we are declaring the temps
|
||||
// Do not call recordTempDeclaration because we are declaring the temps
|
||||
// right here. Recording means they will be declared later.
|
||||
// In the case where the user wrote an identifier as the RHS, like this:
|
||||
//
|
||||
@@ -3655,12 +3660,12 @@ module ts {
|
||||
if (node.initializer.kind === SyntaxKind.VariableDeclarationList) {
|
||||
write("var ");
|
||||
var variableDeclarationList = <VariableDeclarationList>node.initializer;
|
||||
if (variableDeclarationList.declarations.length >= 1) {
|
||||
if (variableDeclarationList.declarations.length > 0) {
|
||||
var declaration = variableDeclarationList.declarations[0];
|
||||
if (isBindingPattern(declaration.name)) {
|
||||
// This works whether the declaration is a var, let, or const.
|
||||
// It will use rhsIterationValue _a[_i] as the initializer.
|
||||
emitDestructuring(declaration, rhsIterationValue);
|
||||
emitDestructuring(declaration, /*isAssignmentExpressionStatement*/ false, rhsIterationValue);
|
||||
}
|
||||
else {
|
||||
// The following call does not include the initializer, so we have
|
||||
@@ -3673,8 +3678,7 @@ module ts {
|
||||
else {
|
||||
// It's an empty declaration list. This can only happen in an error case, if the user wrote
|
||||
// for (var of []) {}
|
||||
var emptyDeclarationListTemp = createTempVariable(node, /*forLoopVariable*/ false);
|
||||
emitNode(emptyDeclarationListTemp);
|
||||
emitNode(createTempVariable(node, /*forLoopVariable*/ false));
|
||||
write(" = ");
|
||||
emitNode(rhsIterationValue);
|
||||
}
|
||||
@@ -3683,11 +3687,10 @@ module ts {
|
||||
// Initializer is an expression. Emit the expression in the body, so that it's
|
||||
// evaluated on every iteration.
|
||||
var assignmentExpression = createBinaryExpression(<Expression>node.initializer, SyntaxKind.EqualsToken, rhsIterationValue, /*startsOnNewLine*/ false);
|
||||
var assignmentExpressionStatement = createExpressionStatement(assignmentExpression);
|
||||
if (node.initializer.kind === SyntaxKind.ArrayLiteralExpression || node.initializer.kind === SyntaxKind.ObjectLiteralExpression) {
|
||||
// This is a destructuring pattern, so call emitDestructuring instead of emit. Calling emit will not work, because it will cause
|
||||
// the BinaryExpression to be passed in instead of the expression statement, which will cause emitDestructuring to crash.
|
||||
emitDestructuring(assignmentExpressionStatement);
|
||||
emitDestructuring(assignmentExpression, /*isAssignmentExpressionStatement*/ true, /*value*/ undefined, /*locationForCheckingExistingName*/ node);
|
||||
}
|
||||
else {
|
||||
emitNode(assignmentExpression);
|
||||
@@ -3864,16 +3867,25 @@ module ts {
|
||||
}
|
||||
}
|
||||
|
||||
// Note that a destructuring assignment can be either an ExpressionStatement or a BinaryExpression.
|
||||
function emitDestructuring(root: ExpressionStatement | BinaryExpression | VariableDeclaration | ParameterDeclaration, value?: Expression) {
|
||||
/**
|
||||
* If the root has a chance of being a synthesized node, callers should also pass a value for
|
||||
* lowestNonSynthesizedAncestor. This should be an ancestor of root, it should not be synthesized,
|
||||
* and there should not be a lower ancestor that introduces a scope. This node will be used as the
|
||||
* location for ensuring that temporary names are unique.
|
||||
*/
|
||||
function emitDestructuring(root: BinaryExpression | VariableDeclaration | ParameterDeclaration,
|
||||
isAssignmentExpressionStatement: boolean,
|
||||
value?: Expression,
|
||||
lowestNonSynthesizedAncestor?: Node) {
|
||||
var emitCount = 0;
|
||||
// An exported declaration is actually emitted as an assignment (to a property on the module object), so
|
||||
// temporary variables in an exported declaration need to have real declarations elsewhere
|
||||
var isDeclaration = (root.kind === SyntaxKind.VariableDeclaration && !(getCombinedNodeFlags(root) & NodeFlags.Export)) || root.kind === SyntaxKind.Parameter;
|
||||
if (root.kind === SyntaxKind.ExpressionStatement || root.kind === SyntaxKind.BinaryExpression) {
|
||||
emitAssignmentExpression(<ExpressionStatement | BinaryExpression>root);
|
||||
if (root.kind === SyntaxKind.BinaryExpression) {
|
||||
emitAssignmentExpression(<BinaryExpression>root);
|
||||
}
|
||||
else {
|
||||
Debug.assert(!isAssignmentExpressionStatement);
|
||||
emitBindingElement(<BindingElement>root, value);
|
||||
}
|
||||
|
||||
@@ -3895,7 +3907,10 @@ module ts {
|
||||
|
||||
function ensureIdentifier(expr: Expression): Expression {
|
||||
if (expr.kind !== SyntaxKind.Identifier) {
|
||||
var identifier = createTempVariable(root);
|
||||
// In case the root is a synthesized node, we need to pass lowestNonSynthesizedAncestor
|
||||
// as the location for determining uniqueness of the variable we are about to
|
||||
// generate.
|
||||
var identifier = createTempVariable(lowestNonSynthesizedAncestor || root);
|
||||
if (!isDeclaration) {
|
||||
recordTempDeclaration(identifier);
|
||||
}
|
||||
@@ -4013,14 +4028,13 @@ module ts {
|
||||
}
|
||||
}
|
||||
|
||||
function emitAssignmentExpression(root: ExpressionStatement | BinaryExpression) {
|
||||
// Synthesized nodes will not have parents, so the ExpressionStatements will have to be passed
|
||||
// in directly. Otherwise, it will crash when we access the parent of a synthesized binary expression.
|
||||
var emitParenthesized = root.kind !== SyntaxKind.ExpressionStatement && root.parent.kind !== SyntaxKind.ExpressionStatement;
|
||||
var expression = <BinaryExpression>(root.kind === SyntaxKind.ExpressionStatement ? (<ExpressionStatement>root).expression : <BinaryExpression>root);
|
||||
var target = expression.left;
|
||||
var value = expression.right;
|
||||
if (emitParenthesized) {
|
||||
function emitAssignmentExpression(root: BinaryExpression) {
|
||||
var target = root.left;
|
||||
var value = root.right;
|
||||
if (isAssignmentExpressionStatement) {
|
||||
emitDestructuringAssignment(target, value);
|
||||
}
|
||||
else {
|
||||
if (root.parent.kind !== SyntaxKind.ParenthesizedExpression) {
|
||||
write("(");
|
||||
}
|
||||
@@ -4032,9 +4046,6 @@ module ts {
|
||||
write(")");
|
||||
}
|
||||
}
|
||||
else {
|
||||
emitDestructuringAssignment(target, value);
|
||||
}
|
||||
}
|
||||
|
||||
function emitBindingElement(target: BindingElement, value: Expression) {
|
||||
@@ -4085,7 +4096,7 @@ module ts {
|
||||
function emitVariableDeclaration(node: VariableDeclaration) {
|
||||
if (isBindingPattern(node.name)) {
|
||||
if (languageVersion < ScriptTarget.ES6) {
|
||||
emitDestructuring(node);
|
||||
emitDestructuring(node, /*isAssignmentExpressionStatement*/ false);
|
||||
}
|
||||
else {
|
||||
emit(node.name);
|
||||
@@ -4248,7 +4259,7 @@ module ts {
|
||||
if (isBindingPattern(p.name)) {
|
||||
writeLine();
|
||||
write("var ");
|
||||
emitDestructuring(p, tempParameters[tempIndex]);
|
||||
emitDestructuring(p, /*isAssignmentExpressionStatement*/ false, tempParameters[tempIndex]);
|
||||
write(";");
|
||||
tempIndex++;
|
||||
}
|
||||
@@ -5310,7 +5321,7 @@ module ts {
|
||||
return statements.length;
|
||||
}
|
||||
|
||||
function emitSourceFile(node: SourceFile) {
|
||||
function emitSourceFileNode(node: SourceFile) {
|
||||
// Start new file on new line
|
||||
writeLine();
|
||||
emitDetachedComments(node);
|
||||
@@ -5553,7 +5564,7 @@ module ts {
|
||||
case SyntaxKind.ExportDeclaration:
|
||||
return emitExportDeclaration(<ExportDeclaration>node);
|
||||
case SyntaxKind.SourceFile:
|
||||
return emitSourceFile(<SourceFile>node);
|
||||
return emitSourceFileNode(<SourceFile>node);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1205,7 +1205,7 @@ module ts {
|
||||
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
|
||||
// Returns the constant value this property access resolves to, or 'undefined' for a non-constant
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
}
|
||||
|
||||
|
||||
@@ -942,7 +942,7 @@ declare module "typescript" {
|
||||
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
|
||||
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
}
|
||||
const enum SymbolFlags {
|
||||
|
||||
@@ -3063,13 +3063,11 @@ declare module "typescript" {
|
||||
>PropertyAccessExpression : PropertyAccessExpression
|
||||
>ElementAccessExpression : ElementAccessExpression
|
||||
|
||||
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
|
||||
>isUnknownIdentifier : (location: Node, name: string, sourceFile: SourceFile) => boolean
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
>isUnknownIdentifier : (location: Node, name: string) => boolean
|
||||
>location : Node
|
||||
>Node : Node
|
||||
>name : string
|
||||
>sourceFile : SourceFile
|
||||
>SourceFile : SourceFile
|
||||
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
>getBlockScopedVariableId : (node: Identifier) => number
|
||||
|
||||
@@ -973,7 +973,7 @@ declare module "typescript" {
|
||||
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
|
||||
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
}
|
||||
const enum SymbolFlags {
|
||||
|
||||
@@ -3209,13 +3209,11 @@ declare module "typescript" {
|
||||
>PropertyAccessExpression : PropertyAccessExpression
|
||||
>ElementAccessExpression : ElementAccessExpression
|
||||
|
||||
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
|
||||
>isUnknownIdentifier : (location: Node, name: string, sourceFile: SourceFile) => boolean
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
>isUnknownIdentifier : (location: Node, name: string) => boolean
|
||||
>location : Node
|
||||
>Node : Node
|
||||
>name : string
|
||||
>sourceFile : SourceFile
|
||||
>SourceFile : SourceFile
|
||||
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
>getBlockScopedVariableId : (node: Identifier) => number
|
||||
|
||||
@@ -974,7 +974,7 @@ declare module "typescript" {
|
||||
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
|
||||
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
}
|
||||
const enum SymbolFlags {
|
||||
|
||||
@@ -3159,13 +3159,11 @@ declare module "typescript" {
|
||||
>PropertyAccessExpression : PropertyAccessExpression
|
||||
>ElementAccessExpression : ElementAccessExpression
|
||||
|
||||
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
|
||||
>isUnknownIdentifier : (location: Node, name: string, sourceFile: SourceFile) => boolean
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
>isUnknownIdentifier : (location: Node, name: string) => boolean
|
||||
>location : Node
|
||||
>Node : Node
|
||||
>name : string
|
||||
>sourceFile : SourceFile
|
||||
>SourceFile : SourceFile
|
||||
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
>getBlockScopedVariableId : (node: Identifier) => number
|
||||
|
||||
@@ -1011,7 +1011,7 @@ declare module "typescript" {
|
||||
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
|
||||
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
}
|
||||
const enum SymbolFlags {
|
||||
|
||||
@@ -3332,13 +3332,11 @@ declare module "typescript" {
|
||||
>PropertyAccessExpression : PropertyAccessExpression
|
||||
>ElementAccessExpression : ElementAccessExpression
|
||||
|
||||
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
|
||||
>isUnknownIdentifier : (location: Node, name: string, sourceFile: SourceFile) => boolean
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
>isUnknownIdentifier : (location: Node, name: string) => boolean
|
||||
>location : Node
|
||||
>Node : Node
|
||||
>name : string
|
||||
>sourceFile : SourceFile
|
||||
>SourceFile : SourceFile
|
||||
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
>getBlockScopedVariableId : (node: Identifier) => number
|
||||
|
||||
@@ -4,7 +4,11 @@ for (var v of ['a', 'b', 'c']) {
|
||||
}
|
||||
|
||||
//// [ES5For-of1.js]
|
||||
for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [
|
||||
'a',
|
||||
'b',
|
||||
'c'
|
||||
]; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
console.log(v);
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of1.js.map]
|
||||
{"version":3,"file":"ES5For-of1.js","sourceRoot":"","sources":["ES5For-of1.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClB"}
|
||||
{"version":3,"file":"ES5For-of1.js","sourceRoot":"","sources":["ES5For-of1.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClB"}
|
||||
@@ -8,61 +8,72 @@ sources: ES5For-of1.ts
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of1.js
|
||||
sourceFile:ES5For-of1.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
>>>for (var _i = 0, _a = [
|
||||
1 >
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^
|
||||
8 > ^^^
|
||||
9 > ^^
|
||||
10> ^^^
|
||||
11> ^^
|
||||
12> ^^^
|
||||
13> ^
|
||||
14> ^^
|
||||
15> ^^^^^^^^^^^^^^
|
||||
16> ^^
|
||||
17> ^^^^
|
||||
18> ^
|
||||
1 >
|
||||
2 >for
|
||||
3 >
|
||||
4 > (var v of
|
||||
5 > ['a', 'b', 'c']
|
||||
6 >
|
||||
7 > [
|
||||
8 > 'a'
|
||||
9 > ,
|
||||
10> 'b'
|
||||
11> ,
|
||||
12> 'c'
|
||||
13> ]
|
||||
14>
|
||||
15> var v
|
||||
16>
|
||||
17> var v of ['a', 'b', 'c']
|
||||
18> )
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
4 >Emitted(1, 6) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(1, 16) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(1, 18) Source(1, 15) + SourceIndex(0)
|
||||
7 >Emitted(1, 24) Source(1, 16) + SourceIndex(0)
|
||||
8 >Emitted(1, 27) Source(1, 19) + SourceIndex(0)
|
||||
9 >Emitted(1, 29) Source(1, 21) + SourceIndex(0)
|
||||
10>Emitted(1, 32) Source(1, 24) + SourceIndex(0)
|
||||
11>Emitted(1, 34) Source(1, 26) + SourceIndex(0)
|
||||
12>Emitted(1, 37) Source(1, 29) + SourceIndex(0)
|
||||
13>Emitted(1, 38) Source(1, 30) + SourceIndex(0)
|
||||
14>Emitted(1, 40) Source(1, 6) + SourceIndex(0)
|
||||
15>Emitted(1, 54) Source(1, 11) + SourceIndex(0)
|
||||
16>Emitted(1, 56) Source(1, 6) + SourceIndex(0)
|
||||
17>Emitted(1, 60) Source(1, 30) + SourceIndex(0)
|
||||
18>Emitted(1, 61) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> 'a',
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 'a'
|
||||
1 >Emitted(2, 5) Source(1, 16) + SourceIndex(0)
|
||||
2 >Emitted(2, 8) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>> 'b',
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 'b'
|
||||
1->Emitted(3, 5) Source(1, 21) + SourceIndex(0)
|
||||
2 >Emitted(3, 8) Source(1, 24) + SourceIndex(0)
|
||||
---
|
||||
>>> 'c'
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 'c'
|
||||
1->Emitted(4, 5) Source(1, 26) + SourceIndex(0)
|
||||
2 >Emitted(4, 8) Source(1, 29) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
1->]
|
||||
2 >
|
||||
3 > var v
|
||||
4 >
|
||||
5 > var v of ['a', 'b', 'c']
|
||||
6 > )
|
||||
1->Emitted(5, 2) Source(1, 30) + SourceIndex(0)
|
||||
2 >Emitted(5, 4) Source(1, 6) + SourceIndex(0)
|
||||
3 >Emitted(5, 18) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(5, 20) Source(1, 6) + SourceIndex(0)
|
||||
5 >Emitted(5, 24) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(5, 25) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = _a[_i];
|
||||
1 >^^^^
|
||||
@@ -74,10 +85,10 @@ sourceFile:ES5For-of1.ts
|
||||
2 > var
|
||||
3 > v
|
||||
4 >
|
||||
1 >Emitted(2, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(2, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(2, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(2, 19) Source(1, 11) + SourceIndex(0)
|
||||
1 >Emitted(6, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(6, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(6, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(6, 19) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> console.log(v);
|
||||
1->^^^^
|
||||
@@ -97,20 +108,20 @@ sourceFile:ES5For-of1.ts
|
||||
6 > v
|
||||
7 > )
|
||||
8 > ;
|
||||
1->Emitted(3, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(3, 12) Source(2, 12) + SourceIndex(0)
|
||||
3 >Emitted(3, 13) Source(2, 13) + SourceIndex(0)
|
||||
4 >Emitted(3, 16) Source(2, 16) + SourceIndex(0)
|
||||
5 >Emitted(3, 17) Source(2, 17) + SourceIndex(0)
|
||||
6 >Emitted(3, 18) Source(2, 18) + SourceIndex(0)
|
||||
7 >Emitted(3, 19) Source(2, 19) + SourceIndex(0)
|
||||
8 >Emitted(3, 20) Source(2, 20) + SourceIndex(0)
|
||||
1->Emitted(7, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(7, 12) Source(2, 12) + SourceIndex(0)
|
||||
3 >Emitted(7, 13) Source(2, 13) + SourceIndex(0)
|
||||
4 >Emitted(7, 16) Source(2, 16) + SourceIndex(0)
|
||||
5 >Emitted(7, 17) Source(2, 17) + SourceIndex(0)
|
||||
6 >Emitted(7, 18) Source(2, 18) + SourceIndex(0)
|
||||
7 >Emitted(7, 19) Source(2, 19) + SourceIndex(0)
|
||||
8 >Emitted(7, 20) Source(2, 20) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(4, 2) Source(3, 2) + SourceIndex(0)
|
||||
1 >Emitted(8, 2) Source(3, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of1.js.map
|
||||
@@ -9,7 +9,9 @@ for (foo().x of []) {
|
||||
|
||||
//// [ES5For-of10.js]
|
||||
function foo() {
|
||||
return { x: 0 };
|
||||
return {
|
||||
x: 0
|
||||
};
|
||||
}
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
foo().x = _a[_i];
|
||||
|
||||
@@ -4,7 +4,11 @@ for (let v of ['a', 'b', 'c']) {
|
||||
}
|
||||
|
||||
//// [ES5For-of13.js]
|
||||
for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [
|
||||
'a',
|
||||
'b',
|
||||
'c'
|
||||
]; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var x = v;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of13.js.map]
|
||||
{"version":3,"file":"ES5For-of13.js","sourceRoot":"","sources":["ES5For-of13.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CACb"}
|
||||
{"version":3,"file":"ES5For-of13.js","sourceRoot":"","sources":["ES5For-of13.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CACb"}
|
||||
@@ -8,61 +8,72 @@ sources: ES5For-of13.ts
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of13.js
|
||||
sourceFile:ES5For-of13.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
>>>for (var _i = 0, _a = [
|
||||
1 >
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^
|
||||
8 > ^^^
|
||||
9 > ^^
|
||||
10> ^^^
|
||||
11> ^^
|
||||
12> ^^^
|
||||
13> ^
|
||||
14> ^^
|
||||
15> ^^^^^^^^^^^^^^
|
||||
16> ^^
|
||||
17> ^^^^
|
||||
18> ^
|
||||
1 >
|
||||
2 >for
|
||||
3 >
|
||||
4 > (let v of
|
||||
5 > ['a', 'b', 'c']
|
||||
6 >
|
||||
7 > [
|
||||
8 > 'a'
|
||||
9 > ,
|
||||
10> 'b'
|
||||
11> ,
|
||||
12> 'c'
|
||||
13> ]
|
||||
14>
|
||||
15> let v
|
||||
16>
|
||||
17> let v of ['a', 'b', 'c']
|
||||
18> )
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
4 >Emitted(1, 6) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(1, 16) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(1, 18) Source(1, 15) + SourceIndex(0)
|
||||
7 >Emitted(1, 24) Source(1, 16) + SourceIndex(0)
|
||||
8 >Emitted(1, 27) Source(1, 19) + SourceIndex(0)
|
||||
9 >Emitted(1, 29) Source(1, 21) + SourceIndex(0)
|
||||
10>Emitted(1, 32) Source(1, 24) + SourceIndex(0)
|
||||
11>Emitted(1, 34) Source(1, 26) + SourceIndex(0)
|
||||
12>Emitted(1, 37) Source(1, 29) + SourceIndex(0)
|
||||
13>Emitted(1, 38) Source(1, 30) + SourceIndex(0)
|
||||
14>Emitted(1, 40) Source(1, 6) + SourceIndex(0)
|
||||
15>Emitted(1, 54) Source(1, 11) + SourceIndex(0)
|
||||
16>Emitted(1, 56) Source(1, 6) + SourceIndex(0)
|
||||
17>Emitted(1, 60) Source(1, 30) + SourceIndex(0)
|
||||
18>Emitted(1, 61) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> 'a',
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 'a'
|
||||
1 >Emitted(2, 5) Source(1, 16) + SourceIndex(0)
|
||||
2 >Emitted(2, 8) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>> 'b',
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 'b'
|
||||
1->Emitted(3, 5) Source(1, 21) + SourceIndex(0)
|
||||
2 >Emitted(3, 8) Source(1, 24) + SourceIndex(0)
|
||||
---
|
||||
>>> 'c'
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 'c'
|
||||
1->Emitted(4, 5) Source(1, 26) + SourceIndex(0)
|
||||
2 >Emitted(4, 8) Source(1, 29) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
1->]
|
||||
2 >
|
||||
3 > let v
|
||||
4 >
|
||||
5 > let v of ['a', 'b', 'c']
|
||||
6 > )
|
||||
1->Emitted(5, 2) Source(1, 30) + SourceIndex(0)
|
||||
2 >Emitted(5, 4) Source(1, 6) + SourceIndex(0)
|
||||
3 >Emitted(5, 18) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(5, 20) Source(1, 6) + SourceIndex(0)
|
||||
5 >Emitted(5, 24) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(5, 25) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = _a[_i];
|
||||
1 >^^^^
|
||||
@@ -73,10 +84,10 @@ sourceFile:ES5For-of13.ts
|
||||
2 > let
|
||||
3 > v
|
||||
4 >
|
||||
1 >Emitted(2, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(2, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(2, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(2, 19) Source(1, 11) + SourceIndex(0)
|
||||
1 >Emitted(6, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(6, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(6, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(6, 19) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> var x = v;
|
||||
1 >^^^^
|
||||
@@ -92,18 +103,18 @@ sourceFile:ES5For-of13.ts
|
||||
4 > =
|
||||
5 > v
|
||||
6 > ;
|
||||
1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(3, 9) Source(2, 9) + SourceIndex(0)
|
||||
3 >Emitted(3, 10) Source(2, 10) + SourceIndex(0)
|
||||
4 >Emitted(3, 13) Source(2, 13) + SourceIndex(0)
|
||||
5 >Emitted(3, 14) Source(2, 14) + SourceIndex(0)
|
||||
6 >Emitted(3, 15) Source(2, 15) + SourceIndex(0)
|
||||
1 >Emitted(7, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(7, 9) Source(2, 9) + SourceIndex(0)
|
||||
3 >Emitted(7, 10) Source(2, 10) + SourceIndex(0)
|
||||
4 >Emitted(7, 13) Source(2, 13) + SourceIndex(0)
|
||||
5 >Emitted(7, 14) Source(2, 14) + SourceIndex(0)
|
||||
6 >Emitted(7, 15) Source(2, 15) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(4, 2) Source(3, 2) + SourceIndex(0)
|
||||
1 >Emitted(8, 2) Source(3, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of13.js.map
|
||||
@@ -11,7 +11,9 @@ for (let v of []) {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
v;
|
||||
for (var _b = 0, _c = [v]; _b < _c.length; _b++) {
|
||||
for (var _b = 0, _c = [
|
||||
v
|
||||
]; _b < _c.length; _b++) {
|
||||
var _v = _c[_b];
|
||||
var x = _v;
|
||||
_v++;
|
||||
|
||||
@@ -10,7 +10,9 @@ for (let v of []) {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var _v;
|
||||
for (var _b = 0, _c = [v]; _b < _c.length; _b++) {
|
||||
for (var _b = 0, _c = [
|
||||
v
|
||||
]; _b < _c.length; _b++) {
|
||||
var _v_1 = _c[_b];
|
||||
var _v_2;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,11 @@ for (var x of [1, 2, 3]) {
|
||||
}
|
||||
|
||||
//// [ES5For-of22.js]
|
||||
for (var _i = 0, _a = [1, 2, 3]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
var x = _a[_i];
|
||||
var _a_1 = 0;
|
||||
console.log(x);
|
||||
|
||||
@@ -5,7 +5,11 @@ for (var x of [1, 2, 3]) {
|
||||
}
|
||||
|
||||
//// [ES5For-of23.js]
|
||||
for (var _i = 0, _b = [1, 2, 3]; _i < _b.length; _i++) {
|
||||
for (var _i = 0, _b = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]; _i < _b.length; _i++) {
|
||||
var x = _b[_i];
|
||||
var _a = 0;
|
||||
console.log(x);
|
||||
|
||||
@@ -5,7 +5,11 @@ for (var v of a) {
|
||||
}
|
||||
|
||||
//// [ES5For-of24.js]
|
||||
var a = [1, 2, 3];
|
||||
var a = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
];
|
||||
for (var _i = 0; _i < a.length; _i++) {
|
||||
var v = a[_i];
|
||||
var _a = 0;
|
||||
|
||||
@@ -6,7 +6,11 @@ for (var v of a) {
|
||||
}
|
||||
|
||||
//// [ES5For-of25.js]
|
||||
var a = [1, 2, 3];
|
||||
var a = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
];
|
||||
for (var _i = 0; _i < a.length; _i++) {
|
||||
var v = a[_i];
|
||||
v;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of25.js.map]
|
||||
{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClB,GAAG,CAAC,CAAU,UAAC,EAAV,aAAK,EAAL,IAAU,CAAC;IAAX,IAAI,CAAC,GAAI,CAAC,IAAL;IACN,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG;IAAC,CAAC;IAAE,CAAC;IAAE,CAAC;CAAC,CAAC;AAClB,GAAG,CAAC,CAAU,UAAC,EAAV,aAAK,EAAL,IAAU,CAAC;IAAX,IAAI,CAAC,GAAI,CAAC,IAAL;IACN,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
@@ -8,44 +8,54 @@ sources: ES5For-of25.ts
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of25.js
|
||||
sourceFile:ES5For-of25.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>var a = [1, 2, 3];
|
||||
>>>var a = [
|
||||
1 >
|
||||
2 >^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
5 > ^
|
||||
6 > ^
|
||||
7 > ^^
|
||||
8 > ^
|
||||
9 > ^^
|
||||
10> ^
|
||||
11> ^
|
||||
12> ^
|
||||
13> ^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
2 >var
|
||||
3 > a
|
||||
4 > =
|
||||
5 > [
|
||||
6 > 1
|
||||
7 > ,
|
||||
8 > 2
|
||||
9 > ,
|
||||
10> 3
|
||||
11> ]
|
||||
12> ;
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0)
|
||||
4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0)
|
||||
5 >Emitted(1, 10) Source(1, 10) + SourceIndex(0)
|
||||
6 >Emitted(1, 11) Source(1, 11) + SourceIndex(0)
|
||||
7 >Emitted(1, 13) Source(1, 13) + SourceIndex(0)
|
||||
8 >Emitted(1, 14) Source(1, 14) + SourceIndex(0)
|
||||
9 >Emitted(1, 16) Source(1, 16) + SourceIndex(0)
|
||||
10>Emitted(1, 17) Source(1, 17) + SourceIndex(0)
|
||||
11>Emitted(1, 18) Source(1, 18) + SourceIndex(0)
|
||||
12>Emitted(1, 19) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>> 1,
|
||||
1 >^^^^
|
||||
2 > ^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 1
|
||||
1 >Emitted(2, 5) Source(1, 10) + SourceIndex(0)
|
||||
2 >Emitted(2, 6) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> 2,
|
||||
1->^^^^
|
||||
2 > ^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 2
|
||||
1->Emitted(3, 5) Source(1, 13) + SourceIndex(0)
|
||||
2 >Emitted(3, 6) Source(1, 14) + SourceIndex(0)
|
||||
---
|
||||
>>> 3
|
||||
1->^^^^
|
||||
2 > ^
|
||||
1->,
|
||||
2 > 3
|
||||
1->Emitted(4, 5) Source(1, 16) + SourceIndex(0)
|
||||
2 >Emitted(4, 6) Source(1, 17) + SourceIndex(0)
|
||||
---
|
||||
>>>];
|
||||
1 >^
|
||||
2 > ^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >]
|
||||
2 > ;
|
||||
1 >Emitted(5, 2) Source(1, 18) + SourceIndex(0)
|
||||
2 >Emitted(5, 3) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>>for (var _i = 0; _i < a.length; _i++) {
|
||||
1->
|
||||
@@ -69,16 +79,16 @@ sourceFile:ES5For-of25.ts
|
||||
8 >
|
||||
9 > var v of a
|
||||
10> )
|
||||
1->Emitted(2, 1) Source(2, 1) + SourceIndex(0)
|
||||
2 >Emitted(2, 4) Source(2, 4) + SourceIndex(0)
|
||||
3 >Emitted(2, 5) Source(2, 5) + SourceIndex(0)
|
||||
4 >Emitted(2, 6) Source(2, 15) + SourceIndex(0)
|
||||
5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0)
|
||||
6 >Emitted(2, 18) Source(2, 6) + SourceIndex(0)
|
||||
7 >Emitted(2, 31) Source(2, 11) + SourceIndex(0)
|
||||
8 >Emitted(2, 33) Source(2, 6) + SourceIndex(0)
|
||||
9 >Emitted(2, 37) Source(2, 16) + SourceIndex(0)
|
||||
10>Emitted(2, 38) Source(2, 17) + SourceIndex(0)
|
||||
1->Emitted(6, 1) Source(2, 1) + SourceIndex(0)
|
||||
2 >Emitted(6, 4) Source(2, 4) + SourceIndex(0)
|
||||
3 >Emitted(6, 5) Source(2, 5) + SourceIndex(0)
|
||||
4 >Emitted(6, 6) Source(2, 15) + SourceIndex(0)
|
||||
5 >Emitted(6, 16) Source(2, 16) + SourceIndex(0)
|
||||
6 >Emitted(6, 18) Source(2, 6) + SourceIndex(0)
|
||||
7 >Emitted(6, 31) Source(2, 11) + SourceIndex(0)
|
||||
8 >Emitted(6, 33) Source(2, 6) + SourceIndex(0)
|
||||
9 >Emitted(6, 37) Source(2, 16) + SourceIndex(0)
|
||||
10>Emitted(6, 38) Source(2, 17) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = a[_i];
|
||||
1 >^^^^
|
||||
@@ -93,12 +103,12 @@ sourceFile:ES5For-of25.ts
|
||||
4 > of
|
||||
5 > a
|
||||
6 >
|
||||
1 >Emitted(3, 5) Source(2, 6) + SourceIndex(0)
|
||||
2 >Emitted(3, 9) Source(2, 10) + SourceIndex(0)
|
||||
3 >Emitted(3, 10) Source(2, 11) + SourceIndex(0)
|
||||
4 >Emitted(3, 13) Source(2, 15) + SourceIndex(0)
|
||||
5 >Emitted(3, 14) Source(2, 16) + SourceIndex(0)
|
||||
6 >Emitted(3, 18) Source(2, 11) + SourceIndex(0)
|
||||
1 >Emitted(7, 5) Source(2, 6) + SourceIndex(0)
|
||||
2 >Emitted(7, 9) Source(2, 10) + SourceIndex(0)
|
||||
3 >Emitted(7, 10) Source(2, 11) + SourceIndex(0)
|
||||
4 >Emitted(7, 13) Source(2, 15) + SourceIndex(0)
|
||||
5 >Emitted(7, 14) Source(2, 16) + SourceIndex(0)
|
||||
6 >Emitted(7, 18) Source(2, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> v;
|
||||
1 >^^^^
|
||||
@@ -109,9 +119,9 @@ sourceFile:ES5For-of25.ts
|
||||
>
|
||||
2 > v
|
||||
3 > ;
|
||||
1 >Emitted(4, 5) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(4, 6) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(4, 7) Source(3, 7) + SourceIndex(0)
|
||||
1 >Emitted(8, 5) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(8, 6) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(8, 7) Source(3, 7) + SourceIndex(0)
|
||||
---
|
||||
>>> a;
|
||||
1->^^^^
|
||||
@@ -121,15 +131,15 @@ sourceFile:ES5For-of25.ts
|
||||
>
|
||||
2 > a
|
||||
3 > ;
|
||||
1->Emitted(5, 5) Source(4, 5) + SourceIndex(0)
|
||||
2 >Emitted(5, 6) Source(4, 6) + SourceIndex(0)
|
||||
3 >Emitted(5, 7) Source(4, 7) + SourceIndex(0)
|
||||
1->Emitted(9, 5) Source(4, 5) + SourceIndex(0)
|
||||
2 >Emitted(9, 6) Source(4, 6) + SourceIndex(0)
|
||||
3 >Emitted(9, 7) Source(4, 7) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(6, 2) Source(5, 2) + SourceIndex(0)
|
||||
1 >Emitted(10, 2) Source(5, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of25.js.map
|
||||
@@ -5,7 +5,10 @@ for (var [a = 0, b = 1] of [2, 3]) {
|
||||
}
|
||||
|
||||
//// [ES5For-of26.js]
|
||||
for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d;
|
||||
a;
|
||||
b;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of26.js.map]
|
||||
{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAuB,UAAM,EAAN,MAAC,CAAC,EAAE,CAAC,CAAC,EAA5B,cAAkB,EAAlB,IAA4B,CAAC;IAA7B,6BAAK,CAAC,mBAAG,CAAC,mBAAE,CAAC,mBAAG,CAAC,KAAC;IACnB,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAuB,UAAM,EAAN;IAAC,CAAC;IAAE,CAAC;CAAC,EAA5B,cAAkB,EAAlB,IAA4B,CAAC;IAA7B,6BAAK,CAAC,mBAAG,CAAC,mBAAE,CAAC,mBAAG,CAAC,KAAC;IACnB,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
@@ -8,56 +8,64 @@ sources: ES5For-of26.ts
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of26.js
|
||||
sourceFile:ES5For-of26.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) {
|
||||
>>>for (var _i = 0, _a = [
|
||||
1 >
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^
|
||||
8 > ^
|
||||
9 > ^^
|
||||
10> ^
|
||||
11> ^
|
||||
12> ^^
|
||||
13> ^^^^^^^^^^^^^^
|
||||
14> ^^
|
||||
15> ^^^^
|
||||
16> ^
|
||||
17> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
2 >for
|
||||
3 >
|
||||
4 > (var [a = 0, b = 1] of
|
||||
5 > [2, 3]
|
||||
6 >
|
||||
7 > [
|
||||
8 > 2
|
||||
9 > ,
|
||||
10> 3
|
||||
11> ]
|
||||
12>
|
||||
13> var [a = 0, b = 1]
|
||||
14>
|
||||
15> var [a = 0, b = 1] of [2, 3]
|
||||
16> )
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
4 >Emitted(1, 6) Source(1, 28) + SourceIndex(0)
|
||||
5 >Emitted(1, 16) Source(1, 34) + SourceIndex(0)
|
||||
6 >Emitted(1, 18) Source(1, 28) + SourceIndex(0)
|
||||
7 >Emitted(1, 24) Source(1, 29) + SourceIndex(0)
|
||||
8 >Emitted(1, 25) Source(1, 30) + SourceIndex(0)
|
||||
9 >Emitted(1, 27) Source(1, 32) + SourceIndex(0)
|
||||
10>Emitted(1, 28) Source(1, 33) + SourceIndex(0)
|
||||
11>Emitted(1, 29) Source(1, 34) + SourceIndex(0)
|
||||
12>Emitted(1, 31) Source(1, 6) + SourceIndex(0)
|
||||
13>Emitted(1, 45) Source(1, 24) + SourceIndex(0)
|
||||
14>Emitted(1, 47) Source(1, 6) + SourceIndex(0)
|
||||
15>Emitted(1, 51) Source(1, 34) + SourceIndex(0)
|
||||
16>Emitted(1, 52) Source(1, 35) + SourceIndex(0)
|
||||
---
|
||||
>>> 2,
|
||||
1 >^^^^
|
||||
2 > ^
|
||||
3 > ^->
|
||||
1 >[
|
||||
2 > 2
|
||||
1 >Emitted(2, 5) Source(1, 29) + SourceIndex(0)
|
||||
2 >Emitted(2, 6) Source(1, 30) + SourceIndex(0)
|
||||
---
|
||||
>>> 3
|
||||
1->^^^^
|
||||
2 > ^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 3
|
||||
1->Emitted(3, 5) Source(1, 32) + SourceIndex(0)
|
||||
2 >Emitted(3, 6) Source(1, 33) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->]
|
||||
2 >
|
||||
3 > var [a = 0, b = 1]
|
||||
4 >
|
||||
5 > var [a = 0, b = 1] of [2, 3]
|
||||
6 > )
|
||||
1->Emitted(4, 2) Source(1, 34) + SourceIndex(0)
|
||||
2 >Emitted(4, 4) Source(1, 6) + SourceIndex(0)
|
||||
3 >Emitted(4, 18) Source(1, 24) + SourceIndex(0)
|
||||
4 >Emitted(4, 20) Source(1, 6) + SourceIndex(0)
|
||||
5 >Emitted(4, 24) Source(1, 34) + SourceIndex(0)
|
||||
6 >Emitted(4, 25) Source(1, 35) + SourceIndex(0)
|
||||
---
|
||||
>>> var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d;
|
||||
1->^^^^
|
||||
@@ -80,16 +88,16 @@ sourceFile:ES5For-of26.ts
|
||||
8 > =
|
||||
9 > 1
|
||||
10> ]
|
||||
1->Emitted(2, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(2, 34) Source(1, 11) + SourceIndex(0)
|
||||
3 >Emitted(2, 35) Source(1, 12) + SourceIndex(0)
|
||||
4 >Emitted(2, 54) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(2, 55) Source(1, 16) + SourceIndex(0)
|
||||
6 >Emitted(2, 74) Source(1, 18) + SourceIndex(0)
|
||||
7 >Emitted(2, 75) Source(1, 19) + SourceIndex(0)
|
||||
8 >Emitted(2, 94) Source(1, 22) + SourceIndex(0)
|
||||
9 >Emitted(2, 95) Source(1, 23) + SourceIndex(0)
|
||||
10>Emitted(2, 100) Source(1, 24) + SourceIndex(0)
|
||||
1->Emitted(5, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(5, 34) Source(1, 11) + SourceIndex(0)
|
||||
3 >Emitted(5, 35) Source(1, 12) + SourceIndex(0)
|
||||
4 >Emitted(5, 54) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(5, 55) Source(1, 16) + SourceIndex(0)
|
||||
6 >Emitted(5, 74) Source(1, 18) + SourceIndex(0)
|
||||
7 >Emitted(5, 75) Source(1, 19) + SourceIndex(0)
|
||||
8 >Emitted(5, 94) Source(1, 22) + SourceIndex(0)
|
||||
9 >Emitted(5, 95) Source(1, 23) + SourceIndex(0)
|
||||
10>Emitted(5, 100) Source(1, 24) + SourceIndex(0)
|
||||
---
|
||||
>>> a;
|
||||
1 >^^^^
|
||||
@@ -100,9 +108,9 @@ sourceFile:ES5For-of26.ts
|
||||
>
|
||||
2 > a
|
||||
3 > ;
|
||||
1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(3, 6) Source(2, 6) + SourceIndex(0)
|
||||
3 >Emitted(3, 7) Source(2, 7) + SourceIndex(0)
|
||||
1 >Emitted(6, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(6, 6) Source(2, 6) + SourceIndex(0)
|
||||
3 >Emitted(6, 7) Source(2, 7) + SourceIndex(0)
|
||||
---
|
||||
>>> b;
|
||||
1->^^^^
|
||||
@@ -112,15 +120,15 @@ sourceFile:ES5For-of26.ts
|
||||
>
|
||||
2 > b
|
||||
3 > ;
|
||||
1->Emitted(4, 5) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(4, 6) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(4, 7) Source(3, 7) + SourceIndex(0)
|
||||
1->Emitted(7, 5) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(7, 6) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(7, 7) Source(3, 7) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(5, 2) Source(4, 2) + SourceIndex(0)
|
||||
1 >Emitted(8, 2) Source(4, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of26.js.map
|
||||
@@ -5,7 +5,10 @@ for (var {x: a = 0, y: b = 1} of [2, 3]) {
|
||||
}
|
||||
|
||||
//// [ES5For-of27.js]
|
||||
for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
var _b = _a[_i], _c = _b.x, a = _c === void 0 ? 0 : _c, _d = _b.y, b = _d === void 0 ? 1 : _d;
|
||||
a;
|
||||
b;
|
||||
|
||||
@@ -5,7 +5,10 @@ for (let [a = 0, b = 1] of [2, 3]) {
|
||||
}
|
||||
|
||||
//// [ES5For-of28.js]
|
||||
for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d;
|
||||
a;
|
||||
b;
|
||||
|
||||
@@ -5,7 +5,10 @@ for (const {x: a = 0, y: b = 1} of [2, 3]) {
|
||||
}
|
||||
|
||||
//// [ES5For-of29.js]
|
||||
for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
var _b = _a[_i], _c = _b.x, a = _c === void 0 ? 0 : _c, _d = _b.y, b = _d === void 0 ? 1 : _d;
|
||||
a;
|
||||
b;
|
||||
|
||||
@@ -3,7 +3,11 @@ for (var v of ['a', 'b', 'c'])
|
||||
var x = v;
|
||||
|
||||
//// [ES5For-of3.js]
|
||||
for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [
|
||||
'a',
|
||||
'b',
|
||||
'c'
|
||||
]; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var x = v;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of3.js.map]
|
||||
{"version":3,"file":"ES5For-of3.js","sourceRoot":"","sources":["ES5For-of3.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CAAA"}
|
||||
{"version":3,"file":"ES5For-of3.js","sourceRoot":"","sources":["ES5For-of3.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CAAA"}
|
||||
@@ -8,61 +8,72 @@ sources: ES5For-of3.ts
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of3.js
|
||||
sourceFile:ES5For-of3.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
>>>for (var _i = 0, _a = [
|
||||
1 >
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^
|
||||
8 > ^^^
|
||||
9 > ^^
|
||||
10> ^^^
|
||||
11> ^^
|
||||
12> ^^^
|
||||
13> ^
|
||||
14> ^^
|
||||
15> ^^^^^^^^^^^^^^
|
||||
16> ^^
|
||||
17> ^^^^
|
||||
18> ^
|
||||
1 >
|
||||
2 >for
|
||||
3 >
|
||||
4 > (var v of
|
||||
5 > ['a', 'b', 'c']
|
||||
6 >
|
||||
7 > [
|
||||
8 > 'a'
|
||||
9 > ,
|
||||
10> 'b'
|
||||
11> ,
|
||||
12> 'c'
|
||||
13> ]
|
||||
14>
|
||||
15> var v
|
||||
16>
|
||||
17> var v of ['a', 'b', 'c']
|
||||
18> )
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
4 >Emitted(1, 6) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(1, 16) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(1, 18) Source(1, 15) + SourceIndex(0)
|
||||
7 >Emitted(1, 24) Source(1, 16) + SourceIndex(0)
|
||||
8 >Emitted(1, 27) Source(1, 19) + SourceIndex(0)
|
||||
9 >Emitted(1, 29) Source(1, 21) + SourceIndex(0)
|
||||
10>Emitted(1, 32) Source(1, 24) + SourceIndex(0)
|
||||
11>Emitted(1, 34) Source(1, 26) + SourceIndex(0)
|
||||
12>Emitted(1, 37) Source(1, 29) + SourceIndex(0)
|
||||
13>Emitted(1, 38) Source(1, 30) + SourceIndex(0)
|
||||
14>Emitted(1, 40) Source(1, 6) + SourceIndex(0)
|
||||
15>Emitted(1, 54) Source(1, 11) + SourceIndex(0)
|
||||
16>Emitted(1, 56) Source(1, 6) + SourceIndex(0)
|
||||
17>Emitted(1, 60) Source(1, 30) + SourceIndex(0)
|
||||
18>Emitted(1, 61) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> 'a',
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 'a'
|
||||
1 >Emitted(2, 5) Source(1, 16) + SourceIndex(0)
|
||||
2 >Emitted(2, 8) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>> 'b',
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 'b'
|
||||
1->Emitted(3, 5) Source(1, 21) + SourceIndex(0)
|
||||
2 >Emitted(3, 8) Source(1, 24) + SourceIndex(0)
|
||||
---
|
||||
>>> 'c'
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 'c'
|
||||
1->Emitted(4, 5) Source(1, 26) + SourceIndex(0)
|
||||
2 >Emitted(4, 8) Source(1, 29) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
1->]
|
||||
2 >
|
||||
3 > var v
|
||||
4 >
|
||||
5 > var v of ['a', 'b', 'c']
|
||||
6 > )
|
||||
1->Emitted(5, 2) Source(1, 30) + SourceIndex(0)
|
||||
2 >Emitted(5, 4) Source(1, 6) + SourceIndex(0)
|
||||
3 >Emitted(5, 18) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(5, 20) Source(1, 6) + SourceIndex(0)
|
||||
5 >Emitted(5, 24) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(5, 25) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = _a[_i];
|
||||
1 >^^^^
|
||||
@@ -73,10 +84,10 @@ sourceFile:ES5For-of3.ts
|
||||
2 > var
|
||||
3 > v
|
||||
4 >
|
||||
1 >Emitted(2, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(2, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(2, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(2, 19) Source(1, 11) + SourceIndex(0)
|
||||
1 >Emitted(6, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(6, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(6, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(6, 19) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> var x = v;
|
||||
1 >^^^^
|
||||
@@ -92,17 +103,17 @@ sourceFile:ES5For-of3.ts
|
||||
4 > =
|
||||
5 > v
|
||||
6 > ;
|
||||
1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(3, 9) Source(2, 9) + SourceIndex(0)
|
||||
3 >Emitted(3, 10) Source(2, 10) + SourceIndex(0)
|
||||
4 >Emitted(3, 13) Source(2, 13) + SourceIndex(0)
|
||||
5 >Emitted(3, 14) Source(2, 14) + SourceIndex(0)
|
||||
6 >Emitted(3, 15) Source(2, 15) + SourceIndex(0)
|
||||
1 >Emitted(7, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(7, 9) Source(2, 9) + SourceIndex(0)
|
||||
3 >Emitted(7, 10) Source(2, 10) + SourceIndex(0)
|
||||
4 >Emitted(7, 13) Source(2, 13) + SourceIndex(0)
|
||||
5 >Emitted(7, 14) Source(2, 14) + SourceIndex(0)
|
||||
6 >Emitted(7, 15) Source(2, 15) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
1 >Emitted(4, 2) Source(2, 15) + SourceIndex(0)
|
||||
1 >Emitted(8, 2) Source(2, 15) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of3.js.map
|
||||
@@ -8,7 +8,10 @@ for ([a = 1, b = ""] of tuple) {
|
||||
|
||||
//// [ES5For-of30.js]
|
||||
var a, b;
|
||||
var tuple = [2, "3"];
|
||||
var tuple = [
|
||||
2,
|
||||
"3"
|
||||
];
|
||||
for (var _i = 0; _i < tuple.length; _i++) {
|
||||
_a = tuple[_i], _b = _a[0], a = _b === void 0 ? 1 : _b, _c = _a[1], b = _c === void 0 ? "" : _c;
|
||||
a;
|
||||
|
||||
@@ -10,6 +10,9 @@ for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var w = _a[_i];
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var v = _c[_b];
|
||||
var x = [w, v];
|
||||
var x = [
|
||||
w,
|
||||
v
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,5 +14,8 @@ for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
}
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var v = _c[_b];
|
||||
var x = [w, v];
|
||||
var x = [
|
||||
w,
|
||||
v
|
||||
];
|
||||
}
|
||||
|
||||
@@ -8,9 +8,15 @@ for (foo().x of ['a', 'b', 'c']) {
|
||||
|
||||
//// [ES5For-of8.js]
|
||||
function foo() {
|
||||
return { x: 0 };
|
||||
return {
|
||||
x: 0
|
||||
};
|
||||
}
|
||||
for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [
|
||||
'a',
|
||||
'b',
|
||||
'c'
|
||||
]; _i < _a.length; _i++) {
|
||||
foo().x = _a[_i];
|
||||
var p = foo().x;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of8.js.map]
|
||||
{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":["foo"],"mappings":"AAAA,SAAS,GAAG;IACRA,MAAMA,CAACA,EAAEA,CAACA,EAAEA,CAACA,EAAEA,CAACA;AACpBA,CAACA;AACD,GAAG,CAAC,CAAY,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAA1B,cAAO,EAAP,IAA0B,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,SAAA;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"}
|
||||
{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":["foo"],"mappings":"AAAA;IACIA,MAAMA,CAACA;QAAEA,CAACA,EAAEA,CAACA;KAAEA,CAACA;AACpBA,CAACA;AACD,GAAG,CAAC,CAAY,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAA1B,cAAO,EAAP,IAA0B,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,SAAA;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"}
|
||||
@@ -10,75 +10,62 @@ sourceFile:ES5For-of8.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>function foo() {
|
||||
1 >
|
||||
2 >^^^^^^^^^
|
||||
3 > ^^^
|
||||
4 > ^^^^^^^^^->
|
||||
2 >^^^^^^^^^^^^^->
|
||||
1 >
|
||||
2 >function
|
||||
3 > foo
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 10) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(1, 13) Source(1, 13) + SourceIndex(0)
|
||||
---
|
||||
>>> return { x: 0 };
|
||||
>>> return {
|
||||
1->^^^^
|
||||
2 > ^^^^^^
|
||||
3 > ^
|
||||
4 > ^^
|
||||
5 > ^
|
||||
6 > ^^
|
||||
7 > ^
|
||||
8 > ^^
|
||||
9 > ^
|
||||
1->() {
|
||||
4 > ^^->
|
||||
1->function foo() {
|
||||
>
|
||||
2 > return
|
||||
3 >
|
||||
4 > {
|
||||
5 > x
|
||||
6 > :
|
||||
7 > 0
|
||||
8 > }
|
||||
9 > ;
|
||||
1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) name (foo)
|
||||
3 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) name (foo)
|
||||
4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) name (foo)
|
||||
5 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) name (foo)
|
||||
6 >Emitted(2, 17) Source(2, 17) + SourceIndex(0) name (foo)
|
||||
7 >Emitted(2, 18) Source(2, 18) + SourceIndex(0) name (foo)
|
||||
8 >Emitted(2, 20) Source(2, 20) + SourceIndex(0) name (foo)
|
||||
9 >Emitted(2, 21) Source(2, 21) + SourceIndex(0) name (foo)
|
||||
---
|
||||
>>> x: 0
|
||||
1->^^^^^^^^
|
||||
2 > ^
|
||||
3 > ^^
|
||||
4 > ^
|
||||
1->{
|
||||
2 > x
|
||||
3 > :
|
||||
4 > 0
|
||||
1->Emitted(3, 9) Source(2, 14) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(3, 10) Source(2, 15) + SourceIndex(0) name (foo)
|
||||
3 >Emitted(3, 12) Source(2, 17) + SourceIndex(0) name (foo)
|
||||
4 >Emitted(3, 13) Source(2, 18) + SourceIndex(0) name (foo)
|
||||
---
|
||||
>>> };
|
||||
1 >^^^^^
|
||||
2 > ^
|
||||
1 > }
|
||||
2 > ;
|
||||
1 >Emitted(4, 6) Source(2, 20) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(4, 7) Source(2, 21) + SourceIndex(0) name (foo)
|
||||
---
|
||||
>>>}
|
||||
1 >
|
||||
2 >^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>
|
||||
2 >}
|
||||
1 >Emitted(3, 1) Source(3, 1) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(3, 2) Source(3, 2) + SourceIndex(0) name (foo)
|
||||
1 >Emitted(5, 1) Source(3, 1) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(5, 2) Source(3, 2) + SourceIndex(0) name (foo)
|
||||
---
|
||||
>>>for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
>>>for (var _i = 0, _a = [
|
||||
1->
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^
|
||||
8 > ^^^
|
||||
9 > ^^
|
||||
10> ^^^
|
||||
11> ^^
|
||||
12> ^^^
|
||||
13> ^
|
||||
14> ^^
|
||||
15> ^^^^^^^^^^^^^^
|
||||
16> ^^
|
||||
17> ^^^^
|
||||
18> ^
|
||||
1->
|
||||
>
|
||||
2 >for
|
||||
@@ -86,36 +73,59 @@ sourceFile:ES5For-of8.ts
|
||||
4 > (foo().x of
|
||||
5 > ['a', 'b', 'c']
|
||||
6 >
|
||||
7 > [
|
||||
8 > 'a'
|
||||
9 > ,
|
||||
10> 'b'
|
||||
11> ,
|
||||
12> 'c'
|
||||
13> ]
|
||||
14>
|
||||
15> foo().x
|
||||
16>
|
||||
17> foo().x of ['a', 'b', 'c']
|
||||
18> )
|
||||
1->Emitted(4, 1) Source(4, 1) + SourceIndex(0)
|
||||
2 >Emitted(4, 4) Source(4, 4) + SourceIndex(0)
|
||||
3 >Emitted(4, 5) Source(4, 5) + SourceIndex(0)
|
||||
4 >Emitted(4, 6) Source(4, 17) + SourceIndex(0)
|
||||
5 >Emitted(4, 16) Source(4, 32) + SourceIndex(0)
|
||||
6 >Emitted(4, 18) Source(4, 17) + SourceIndex(0)
|
||||
7 >Emitted(4, 24) Source(4, 18) + SourceIndex(0)
|
||||
8 >Emitted(4, 27) Source(4, 21) + SourceIndex(0)
|
||||
9 >Emitted(4, 29) Source(4, 23) + SourceIndex(0)
|
||||
10>Emitted(4, 32) Source(4, 26) + SourceIndex(0)
|
||||
11>Emitted(4, 34) Source(4, 28) + SourceIndex(0)
|
||||
12>Emitted(4, 37) Source(4, 31) + SourceIndex(0)
|
||||
13>Emitted(4, 38) Source(4, 32) + SourceIndex(0)
|
||||
14>Emitted(4, 40) Source(4, 6) + SourceIndex(0)
|
||||
15>Emitted(4, 54) Source(4, 13) + SourceIndex(0)
|
||||
16>Emitted(4, 56) Source(4, 6) + SourceIndex(0)
|
||||
17>Emitted(4, 60) Source(4, 32) + SourceIndex(0)
|
||||
18>Emitted(4, 61) Source(4, 33) + SourceIndex(0)
|
||||
1->Emitted(6, 1) Source(4, 1) + SourceIndex(0)
|
||||
2 >Emitted(6, 4) Source(4, 4) + SourceIndex(0)
|
||||
3 >Emitted(6, 5) Source(4, 5) + SourceIndex(0)
|
||||
4 >Emitted(6, 6) Source(4, 17) + SourceIndex(0)
|
||||
5 >Emitted(6, 16) Source(4, 32) + SourceIndex(0)
|
||||
6 >Emitted(6, 18) Source(4, 17) + SourceIndex(0)
|
||||
---
|
||||
>>> 'a',
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 'a'
|
||||
1 >Emitted(7, 5) Source(4, 18) + SourceIndex(0)
|
||||
2 >Emitted(7, 8) Source(4, 21) + SourceIndex(0)
|
||||
---
|
||||
>>> 'b',
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 'b'
|
||||
1->Emitted(8, 5) Source(4, 23) + SourceIndex(0)
|
||||
2 >Emitted(8, 8) Source(4, 26) + SourceIndex(0)
|
||||
---
|
||||
>>> 'c'
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 'c'
|
||||
1->Emitted(9, 5) Source(4, 28) + SourceIndex(0)
|
||||
2 >Emitted(9, 8) Source(4, 31) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
1->]
|
||||
2 >
|
||||
3 > foo().x
|
||||
4 >
|
||||
5 > foo().x of ['a', 'b', 'c']
|
||||
6 > )
|
||||
1->Emitted(10, 2) Source(4, 32) + SourceIndex(0)
|
||||
2 >Emitted(10, 4) Source(4, 6) + SourceIndex(0)
|
||||
3 >Emitted(10, 18) Source(4, 13) + SourceIndex(0)
|
||||
4 >Emitted(10, 20) Source(4, 6) + SourceIndex(0)
|
||||
5 >Emitted(10, 24) Source(4, 32) + SourceIndex(0)
|
||||
6 >Emitted(10, 25) Source(4, 33) + SourceIndex(0)
|
||||
---
|
||||
>>> foo().x = _a[_i];
|
||||
1 >^^^^
|
||||
@@ -131,12 +141,12 @@ sourceFile:ES5For-of8.ts
|
||||
4 > .
|
||||
5 > x
|
||||
6 >
|
||||
1 >Emitted(5, 5) Source(4, 6) + SourceIndex(0)
|
||||
2 >Emitted(5, 8) Source(4, 9) + SourceIndex(0)
|
||||
3 >Emitted(5, 10) Source(4, 11) + SourceIndex(0)
|
||||
4 >Emitted(5, 11) Source(4, 12) + SourceIndex(0)
|
||||
5 >Emitted(5, 12) Source(4, 13) + SourceIndex(0)
|
||||
6 >Emitted(5, 21) Source(4, 13) + SourceIndex(0)
|
||||
1 >Emitted(11, 5) Source(4, 6) + SourceIndex(0)
|
||||
2 >Emitted(11, 8) Source(4, 9) + SourceIndex(0)
|
||||
3 >Emitted(11, 10) Source(4, 11) + SourceIndex(0)
|
||||
4 >Emitted(11, 11) Source(4, 12) + SourceIndex(0)
|
||||
5 >Emitted(11, 12) Source(4, 13) + SourceIndex(0)
|
||||
6 >Emitted(11, 21) Source(4, 13) + SourceIndex(0)
|
||||
---
|
||||
>>> var p = foo().x;
|
||||
1->^^^^
|
||||
@@ -158,21 +168,21 @@ sourceFile:ES5For-of8.ts
|
||||
7 > .
|
||||
8 > x
|
||||
9 > ;
|
||||
1->Emitted(6, 5) Source(5, 5) + SourceIndex(0)
|
||||
2 >Emitted(6, 9) Source(5, 9) + SourceIndex(0)
|
||||
3 >Emitted(6, 10) Source(5, 10) + SourceIndex(0)
|
||||
4 >Emitted(6, 13) Source(5, 13) + SourceIndex(0)
|
||||
5 >Emitted(6, 16) Source(5, 16) + SourceIndex(0)
|
||||
6 >Emitted(6, 18) Source(5, 18) + SourceIndex(0)
|
||||
7 >Emitted(6, 19) Source(5, 19) + SourceIndex(0)
|
||||
8 >Emitted(6, 20) Source(5, 20) + SourceIndex(0)
|
||||
9 >Emitted(6, 21) Source(5, 21) + SourceIndex(0)
|
||||
1->Emitted(12, 5) Source(5, 5) + SourceIndex(0)
|
||||
2 >Emitted(12, 9) Source(5, 9) + SourceIndex(0)
|
||||
3 >Emitted(12, 10) Source(5, 10) + SourceIndex(0)
|
||||
4 >Emitted(12, 13) Source(5, 13) + SourceIndex(0)
|
||||
5 >Emitted(12, 16) Source(5, 16) + SourceIndex(0)
|
||||
6 >Emitted(12, 18) Source(5, 18) + SourceIndex(0)
|
||||
7 >Emitted(12, 19) Source(5, 19) + SourceIndex(0)
|
||||
8 >Emitted(12, 20) Source(5, 20) + SourceIndex(0)
|
||||
9 >Emitted(12, 21) Source(5, 21) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(7, 2) Source(6, 2) + SourceIndex(0)
|
||||
1 >Emitted(13, 2) Source(6, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of8.js.map
|
||||
@@ -10,7 +10,9 @@ for (foo().x of []) {
|
||||
|
||||
//// [ES5For-of9.js]
|
||||
function foo() {
|
||||
return { x: 0 };
|
||||
return {
|
||||
x: 0
|
||||
};
|
||||
}
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
foo().x = _a[_i];
|
||||
|
||||
Reference in New Issue
Block a user