Make 'CatchClause' have-a block, instead of be-a block.

This commit is contained in:
Cyrus Najmabadi 2014-12-01 23:17:34 -08:00
parent 44627f859f
commit 03a2d0197b
15 changed files with 94 additions and 92 deletions

View File

@ -348,8 +348,8 @@ module ts {
bindChildren(node, symbolKind, isBlockScopeContainer);
}
function bindCatchVariableDeclaration(node: CatchBlock) {
var symbol = createSymbol(SymbolFlags.FunctionScopedVariable, node.variable.text || "__missing");
function bindCatchVariableDeclaration(node: CatchClause) {
var symbol = createSymbol(SymbolFlags.FunctionScopedVariable, node.name.text || "__missing");
addDeclarationToSymbol(symbol, node, SymbolFlags.FunctionScopedVariable);
var saveParent = parent;
var savedBlockScopeContainer = blockScopeContainer;
@ -444,8 +444,8 @@ module ts {
case SyntaxKind.ArrowFunction:
bindAnonymousDeclaration(<FunctionExpression>node, SymbolFlags.Function, "__function", /*isBlockScopeContainer*/ true);
break;
case SyntaxKind.CatchBlock:
bindCatchVariableDeclaration(<CatchBlock>node);
case SyntaxKind.CatchClause:
bindCatchVariableDeclaration(<CatchClause>node);
break;
case SyntaxKind.ClassDeclaration:
bindDeclaration(<Declaration>node, SymbolFlags.Class, SymbolFlags.ClassExcludes, /*isBlockScopeContainer*/ false);
@ -478,7 +478,7 @@ module ts {
case SyntaxKind.Block:
case SyntaxKind.TryBlock:
case SyntaxKind.CatchBlock:
case SyntaxKind.CatchClause:
case SyntaxKind.FinallyBlock:
case SyntaxKind.ForStatement:
case SyntaxKind.ForInStatement:

View File

@ -415,8 +415,8 @@ module ts {
break loop;
}
break;
case SyntaxKind.CatchBlock:
var id = (<CatchBlock>location).variable;
case SyntaxKind.CatchClause:
var id = (<CatchClause>location).name;
if (name === id.text) {
result = location.symbol;
break loop;
@ -1753,7 +1753,7 @@ module ts {
}
// Handle catch clause variables
var declaration = symbol.valueDeclaration;
if (declaration.kind === SyntaxKind.CatchBlock) {
if (declaration.kind === SyntaxKind.CatchClause) {
return links.type = anyType;
}
// Handle variable, parameter or property
@ -4375,7 +4375,7 @@ module ts {
case SyntaxKind.ThrowStatement:
case SyntaxKind.TryStatement:
case SyntaxKind.TryBlock:
case SyntaxKind.CatchBlock:
case SyntaxKind.CatchClause:
case SyntaxKind.FinallyBlock:
return forEachChild(node, isAssignedIn);
}
@ -7767,7 +7767,7 @@ module ts {
function checkTryStatement(node: TryStatement) {
checkBlock(node.tryBlock);
if (node.catchBlock) checkBlock(node.catchBlock);
if (node.catchClause) checkBlock(node.catchClause.block);
if (node.finallyBlock) checkBlock(node.finallyBlock);
}
@ -8605,7 +8605,7 @@ module ts {
case SyntaxKind.ThrowStatement:
case SyntaxKind.TryStatement:
case SyntaxKind.TryBlock:
case SyntaxKind.CatchBlock:
case SyntaxKind.CatchClause:
case SyntaxKind.FinallyBlock:
case SyntaxKind.VariableDeclaration:
case SyntaxKind.ClassDeclaration:
@ -8767,8 +8767,8 @@ module ts {
copySymbol(location.symbol, meaning);
}
break;
case SyntaxKind.CatchBlock:
if ((<CatchBlock>location).variable.text) {
case SyntaxKind.CatchClause:
if ((<CatchClause>location).name.text) {
copySymbol(location.symbol, meaning);
}
break;

View File

@ -2142,8 +2142,8 @@ module ts {
return false;
case SyntaxKind.LabeledStatement:
return (<LabeledStatement>node.parent).label === node;
case SyntaxKind.CatchBlock:
return (<CatchBlock>node.parent).variable === node;
case SyntaxKind.CatchClause:
return (<CatchClause>node.parent).name === node;
}
}
@ -2650,7 +2650,7 @@ module ts {
function emitTryStatement(node: TryStatement) {
write("try ");
emit(node.tryBlock);
emit(node.catchBlock);
emit(node.catchClause);
if (node.finallyBlock) {
writeLine();
write("finally ");
@ -2658,15 +2658,15 @@ module ts {
}
}
function emitCatchBlock(node: CatchBlock) {
function emitCatchClause(node: CatchClause) {
writeLine();
var endPos = emitToken(SyntaxKind.CatchKeyword, node.pos);
write(" ");
emitToken(SyntaxKind.OpenParenToken, endPos);
emit(node.variable);
emitToken(SyntaxKind.CloseParenToken, node.variable.end);
emit(node.name);
emitToken(SyntaxKind.CloseParenToken, node.name.end);
write(" ");
emitBlock(node);
emitBlock(node.block);
}
function emitDebuggerStatement(node: Node) {
@ -3599,8 +3599,8 @@ module ts {
return emitThrowStatement(<ThrowStatement>node);
case SyntaxKind.TryStatement:
return emitTryStatement(<TryStatement>node);
case SyntaxKind.CatchBlock:
return emitCatchBlock(<CatchBlock>node);
case SyntaxKind.CatchClause:
return emitCatchClause(<CatchClause>node);
case SyntaxKind.DebuggerStatement:
return emitDebuggerStatement(node);
case SyntaxKind.VariableDeclaration:

View File

@ -364,11 +364,12 @@ module ts {
return child((<ThrowStatement>node).expression);
case SyntaxKind.TryStatement:
return child((<TryStatement>node).tryBlock) ||
child((<TryStatement>node).catchBlock) ||
child((<TryStatement>node).catchClause) ||
child((<TryStatement>node).finallyBlock);
case SyntaxKind.CatchBlock:
return child((<CatchBlock>node).variable) ||
children((<CatchBlock>node).statements);
case SyntaxKind.CatchClause:
return child((<CatchClause>node).name) ||
child((<CatchClause>node).type) ||
child((<CatchClause>node).block);
case SyntaxKind.VariableDeclaration:
return children(node.modifiers) ||
child((<VariableDeclaration>node).name) ||
@ -445,7 +446,7 @@ module ts {
case SyntaxKind.LabeledStatement:
case SyntaxKind.TryStatement:
case SyntaxKind.TryBlock:
case SyntaxKind.CatchBlock:
case SyntaxKind.CatchClause:
case SyntaxKind.FinallyBlock:
return forEachChild(node, traverse);
}
@ -733,8 +734,8 @@ module ts {
return (<Declaration>parent).name === name;
}
if (parent.kind === SyntaxKind.CatchBlock) {
return (<CatchBlock>parent).variable === name;
if (parent.kind === SyntaxKind.CatchClause) {
return (<CatchClause>parent).name === name;
}
return false;
@ -3439,11 +3440,11 @@ module ts {
function parseTryStatement(): TryStatement {
var node = <TryStatement>createNode(SyntaxKind.TryStatement);
node.tryBlock = parseTokenAndBlock(SyntaxKind.TryKeyword);
node.catchBlock = token === SyntaxKind.CatchKeyword ? parseCatchBlock() : undefined;
node.catchClause = token === SyntaxKind.CatchKeyword ? parseCatchClause() : undefined;
// If we don't have a catch clause, then we must have a finally clause. Try to parse
// one out no matter what.
node.finallyBlock = !node.catchBlock || token === SyntaxKind.FinallyKeyword
node.finallyBlock = !node.catchClause || token === SyntaxKind.FinallyKeyword
? parseTokenAndBlock(SyntaxKind.FinallyKeyword)
: undefined;
return finishNode(node);
@ -3459,19 +3460,15 @@ module ts {
return result;
}
function parseCatchBlock(): CatchBlock {
var pos = getNodePos();
function parseCatchClause(): CatchClause {
var result = <CatchClause>createNode(SyntaxKind.CatchClause);
parseExpected(SyntaxKind.CatchKeyword);
parseExpected(SyntaxKind.OpenParenToken);
var variable = parseIdentifier();
var typeAnnotation = parseTypeAnnotation();
result.name = parseIdentifier();
result.type = parseTypeAnnotation();
parseExpected(SyntaxKind.CloseParenToken);
var result = <CatchBlock>parseBlock(SyntaxKind.CatchBlock, /* ignoreMissingOpenBrace */ false, /*checkForStrictMode*/ false);
result.pos = pos;
result.variable = variable;
result.type = typeAnnotation;
return result;
result.block = parseBlock(SyntaxKind.Block, /* ignoreMissingOpenBrace */ false, /*checkForStrictMode*/ false);
return finishNode(result);
}
function parseDebuggerStatement(): Statement {
@ -4325,7 +4322,7 @@ module ts {
case SyntaxKind.EnumDeclaration: return checkEnumDeclaration(<EnumDeclaration>node);
case SyntaxKind.BinaryExpression: return checkBinaryExpression(<BinaryExpression>node);
case SyntaxKind.CatchBlock: return checkCatchBlock(<CatchBlock>node);
case SyntaxKind.CatchClause: return checkCatchClause(<CatchClause>node);
case SyntaxKind.ClassDeclaration: return checkClassDeclaration(<ClassDeclaration>node);
case SyntaxKind.ComputedPropertyName: return checkComputedPropertyName(<ComputedPropertyName>node);
case SyntaxKind.Constructor: return checkConstructor(<ConstructorDeclaration>node);
@ -4583,15 +4580,15 @@ module ts {
}
}
function checkCatchBlock(node: CatchBlock) {
function checkCatchClause(node: CatchClause) {
if (node.type) {
var colonStart = skipTrivia(sourceText, node.variable.end);
var colonStart = skipTrivia(sourceText, node.name.end);
return grammarErrorAtPos(colonStart, ":".length, Diagnostics.Catch_clause_parameter_cannot_have_a_type_annotation);
}
if (node.parserContextFlags & ParserContextFlags.StrictMode && isEvalOrArgumentsIdentifier(node.variable)) {
if (node.parserContextFlags & ParserContextFlags.StrictMode && isEvalOrArgumentsIdentifier(node.name)) {
// It is a SyntaxError if a TryStatement with a Catch occurs within strict code and the Identifier of the
// Catch production is eval or arguments
return reportInvalidUseInStrictMode(node.variable);
return reportInvalidUseInStrictMode(node.name);
}
}

View File

@ -208,7 +208,6 @@ module ts {
ThrowStatement,
TryStatement,
TryBlock,
CatchBlock,
FinallyBlock,
DebuggerStatement,
VariableDeclaration,
@ -222,12 +221,16 @@ module ts {
ModuleBlock,
ImportDeclaration,
ExportAssignment,
// Module references
ExternalModuleReference,
// Clauses
CaseClause,
DefaultClause,
HeritageClause,
CatchClause,
// Property assignments
PropertyAssignment,
ShorthandPropertyAssignment,
@ -693,13 +696,14 @@ module ts {
export interface TryStatement extends Statement {
tryBlock: Block;
catchBlock?: CatchBlock;
catchClause?: CatchClause;
finallyBlock?: Block;
}
export interface CatchBlock extends Block, Declaration {
variable: Identifier;
export interface CatchClause extends Declaration {
name: Identifier;
type?: TypeNode;
block: Block;
}
export interface ModuleElement extends Node {

View File

@ -106,11 +106,13 @@ module ts.BreakpointResolver {
case SyntaxKind.Block:
case SyntaxKind.TryBlock:
case SyntaxKind.CatchBlock:
case SyntaxKind.FinallyBlock:
case SyntaxKind.ModuleBlock:
return spanInBlock(<Block>node);
case SyntaxKind.CatchClause:
return spanInBlock((<CatchClause>node).block);
case SyntaxKind.ExpressionStatement:
// span on the expression
return textSpan((<ExpressionStatement>node).expression);
@ -420,7 +422,7 @@ module ts.BreakpointResolver {
case SyntaxKind.Block:
case SyntaxKind.TryBlock:
case SyntaxKind.CatchBlock:
case SyntaxKind.CatchClause:
case SyntaxKind.FinallyBlock:
return spanInNode((<Block>node.parent).statements[(<Block>node.parent).statements.length - 1]);;

View File

@ -155,10 +155,11 @@ module ts.formatting {
case SyntaxKind.SourceFile:
case SyntaxKind.Block:
case SyntaxKind.TryBlock:
case SyntaxKind.CatchBlock:
case SyntaxKind.FinallyBlock:
case SyntaxKind.ModuleBlock:
return rangeContainsRange((<Block>parent).statements, node)
return rangeContainsRange((<Block>parent).statements, node);
case SyntaxKind.CatchClause:
return rangeContainsRange((<CatchClause>parent).block.statements, node);
}
return false;
@ -898,7 +899,6 @@ module ts.formatting {
case SyntaxKind.Block:
case SyntaxKind.FunctionBlock:
case SyntaxKind.TryBlock:
case SyntaxKind.CatchBlock:
case SyntaxKind.FinallyBlock:
case SyntaxKind.ModuleBlock:
return true;

View File

@ -525,7 +525,6 @@ module ts.formatting {
case SyntaxKind.SwitchStatement:
case SyntaxKind.ObjectLiteralExpression:
case SyntaxKind.TryBlock:
case SyntaxKind.CatchBlock:
case SyntaxKind.FinallyBlock:
case SyntaxKind.FunctionBlock:
case SyntaxKind.ModuleBlock:
@ -581,7 +580,7 @@ module ts.formatting {
case SyntaxKind.EnumDeclaration:
case SyntaxKind.Block:
case SyntaxKind.TryBlock:
case SyntaxKind.CatchBlock:
case SyntaxKind.CatchClause:
case SyntaxKind.FinallyBlock:
case SyntaxKind.FunctionBlock:
case SyntaxKind.ModuleBlock:
@ -603,7 +602,7 @@ module ts.formatting {
case SyntaxKind.WithStatement:
// TODO
// case SyntaxKind.ElseClause:
case SyntaxKind.CatchBlock:
case SyntaxKind.CatchClause:
case SyntaxKind.FinallyBlock:
return true;

View File

@ -79,7 +79,8 @@ module ts {
parent.kind === SyntaxKind.ForStatement ||
parent.kind === SyntaxKind.IfStatement ||
parent.kind === SyntaxKind.WhileStatement ||
parent.kind === SyntaxKind.WithStatement) {
parent.kind === SyntaxKind.WithStatement ||
parent.kind === SyntaxKind.CatchClause) {
addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n));
}
@ -100,7 +101,6 @@ module ts {
case SyntaxKind.FunctionBlock:
case SyntaxKind.ModuleBlock:
case SyntaxKind.TryBlock:
case SyntaxKind.CatchBlock:
case SyntaxKind.FinallyBlock:
var openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile);
var closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile);

View File

@ -2576,7 +2576,7 @@ module ts {
isFunction(containingNodeKind);
case SyntaxKind.OpenParenToken:
return containingNodeKind === SyntaxKind.CatchBlock ||
return containingNodeKind === SyntaxKind.CatchClause ||
isFunction(containingNodeKind);
case SyntaxKind.OpenBraceToken:
@ -3567,8 +3567,8 @@ module ts {
else if (node.kind === SyntaxKind.TryStatement) {
var tryStatement = <TryStatement>node;
if (tryStatement.catchBlock) {
aggregate(tryStatement.catchBlock);
if (tryStatement.catchClause) {
aggregate(tryStatement.catchClause);
}
else {
// Exceptions thrown within a try block lacking a catch clause
@ -3607,7 +3607,7 @@ module ts {
if (parent.kind === SyntaxKind.TryStatement) {
var tryStatement = <TryStatement>parent;
if (tryStatement.tryBlock === child && tryStatement.catchBlock) {
if (tryStatement.tryBlock === child && tryStatement.catchClause) {
return child;
}
}
@ -3623,8 +3623,8 @@ module ts {
pushKeywordIf(keywords, tryStatement.getFirstToken(), SyntaxKind.TryKeyword);
if (tryStatement.catchBlock) {
pushKeywordIf(keywords, tryStatement.catchBlock.getFirstToken(), SyntaxKind.CatchKeyword);
if (tryStatement.catchClause) {
pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), SyntaxKind.CatchKeyword);
}
if (tryStatement.finallyBlock) {
@ -4738,7 +4738,7 @@ module ts {
case SyntaxKind.FunctionDeclaration:
case SyntaxKind.FunctionExpression:
case SyntaxKind.ArrowFunction:
case SyntaxKind.CatchBlock:
case SyntaxKind.CatchClause:
return SemanticMeaning.Value;
case SyntaxKind.TypeParameter:

View File

@ -328,7 +328,6 @@ module ts.formatting {
case SyntaxKind.Block:
case SyntaxKind.FunctionBlock:
case SyntaxKind.TryBlock:
case SyntaxKind.CatchBlock:
case SyntaxKind.FinallyBlock:
case SyntaxKind.ModuleBlock:
case SyntaxKind.ObjectLiteralExpression:
@ -404,12 +403,13 @@ module ts.formatting {
case SyntaxKind.EnumDeclaration:
case SyntaxKind.ObjectLiteralExpression:
case SyntaxKind.Block:
case SyntaxKind.CatchBlock:
case SyntaxKind.FinallyBlock:
case SyntaxKind.FunctionBlock:
case SyntaxKind.ModuleBlock:
case SyntaxKind.SwitchStatement:
return nodeEndsWith(n, SyntaxKind.CloseBraceToken, sourceFile);
case SyntaxKind.CatchClause:
return isCompletedNode((<CatchClause>n).block, sourceFile);
case SyntaxKind.ParenthesizedExpression:
case SyntaxKind.CallSignature:
case SyntaxKind.CallExpression:

View File

@ -1,2 +1,2 @@
//// [sourceMapValidationStatements.js.map]
{"version":3,"file":"sourceMapValidationStatements.js","sourceRoot":"","sources":["sourceMapValidationStatements.ts"],"names":["f"],"mappings":"AAAA,SAAS,CAAC;IACNA,IAAIA,CAACA,CAACA;IACNA,IAAIA,CAACA,GAAGA,CAACA,CAACA;IACVA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,EAAEA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;QAC1BA,CAACA,IAAIA,CAACA,CAACA;QACPA,CAACA,IAAIA,CAACA,CAACA;IACXA,CAACA;IACDA,EAAEA,CAACA,CAACA,CAACA,GAAGA,EAAEA,CAACA,CAACA,CAACA;QACTA,CAACA,IAAIA,CAACA,CAACA;IACXA,CAACA;IAACA,IAAIA,CAACA,CAACA;QACJA,CAACA,IAAIA,EAAEA,CAACA;QACRA,CAACA,EAAEA,CAACA;IACRA,CAACA;IACDA,IAAIA,CAACA,GAAGA;QACJA,CAACA;QACDA,CAACA;QACDA,CAACA;KACJA,CAACA;IACFA,IAAIA,GAAGA,GAAGA;QACNA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,OAAOA;KACbA,CAACA;IACFA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;QACdA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA;QACbA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IACfA,CAACA;IACDA,IAAAA,CAACA;QACGA,GAAGA,CAACA,CAACA,GAAGA,MAAMA,CAACA;IACnBA,CAAEA;IAAAA,KAAKA,CAACA,CAACA,CAACA,CAACA,CAATA,CAACA;QACCA,EAAEA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,EAAEA,CAACA,CAACA,CAACA;YACbA,GAAGA,CAACA,CAACA,GAAGA,EAAEA,CAACA;QACfA,CAACA;QAACA,IAAIA,CAACA,CAACA;YACJA,GAAGA,CAACA,CAACA,GAAGA,KAAKA,CAACA;QAClBA,CAACA;IACLA,CAACA;IACDA,IAAAA,CAACA;QACGA,MAAMA,IAAIA,KAAKA,EAAEA,CAACA;IACtBA,CAAEA;IAAAA,KAAKA,CAACA,CAACA,EAAEA,CAACA,CAAVA,CAACA;QACCA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IACfA,CAACA;YAACA,CAACA;QACCA,CAACA,GAAGA,EAAEA,CAACA;IACXA,CAACA;IACDA,MAAMA,GAAGA,EAAEA,CAACA;QACRA,CAACA,GAAGA,CAACA,CAACA;QACNA,CAACA,GAAGA,EAAEA,CAACA;IACXA,CAACA;IACDA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA;QACZA,KAAKA,CAACA,EAAEA,CAACA;YACLA,CAACA,EAAEA,CAACA;YACJA,KAAKA,CAACA;QAEVA,CAACA;QACDA,KAAKA,CAACA,EAAEA,CAACA;YACLA,CAACA,EAAEA,CAACA;YACJA,KAAKA,CAACA;QAEVA,CAACA;QACDA,SAASA,CAACA;YACNA,CAACA,IAAIA,CAACA,CAACA;YACPA,CAACA,GAAGA,EAAEA,CAACA;YACPA,KAAKA,CAACA;QAEVA,CAACA;IACLA,CAACA;IACDA,OAAOA,CAACA,GAAGA,EAAEA,EAAEA,CAACA;QACZA,CAACA,EAAEA,CAACA;IACRA,CAACA;IACDA,GAAGA,CAACA;QACAA,CAACA,EAAEA,CAACA;IACRA,CAACA,QAAQA,CAACA,GAAGA,CAACA,EAACA;IACfA,CAACA,GAAGA,CAACA,CAACA;IACNA,IAAIA,CAACA,GAAGA,CAACA,CAACA,IAAIA,CAACA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,CAACA;IACjCA,CAACA,CAACA,IAAIA,CAACA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,CAACA;IACzBA,CAACA,KAAKA,CAACA,CAACA;IACRA,CAACA,GAAGA,CAACA,GAAGA,EAAEA,CAACA;IACXA,IAAIA,CAACA,GAAGA,CAACA,CAACA;IACVA,MAAMA,CAACA;AACXA,CAACA;AACD,IAAI,CAAC,GAAG;IACJ,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC,CAAC;AACF,CAAC,EAAE,CAAC"}
{"version":3,"file":"sourceMapValidationStatements.js","sourceRoot":"","sources":["sourceMapValidationStatements.ts"],"names":["f"],"mappings":"AAAA,SAAS,CAAC;IACNA,IAAIA,CAACA,CAACA;IACNA,IAAIA,CAACA,GAAGA,CAACA,CAACA;IACVA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,EAAEA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;QAC1BA,CAACA,IAAIA,CAACA,CAACA;QACPA,CAACA,IAAIA,CAACA,CAACA;IACXA,CAACA;IACDA,EAAEA,CAACA,CAACA,CAACA,GAAGA,EAAEA,CAACA,CAACA,CAACA;QACTA,CAACA,IAAIA,CAACA,CAACA;IACXA,CAACA;IAACA,IAAIA,CAACA,CAACA;QACJA,CAACA,IAAIA,EAAEA,CAACA;QACRA,CAACA,EAAEA,CAACA;IACRA,CAACA;IACDA,IAAIA,CAACA,GAAGA;QACJA,CAACA;QACDA,CAACA;QACDA,CAACA;KACJA,CAACA;IACFA,IAAIA,GAAGA,GAAGA;QACNA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,OAAOA;KACbA,CAACA;IACFA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;QACdA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA;QACbA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IACfA,CAACA;IACDA,IAAAA,CAACA;QACGA,GAAGA,CAACA,CAACA,GAAGA,MAAMA,CAACA;IACnBA,CAAEA;IAAAA,KAAKA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;QACTA,EAAEA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,EAAEA,CAACA,CAACA,CAACA;YACbA,GAAGA,CAACA,CAACA,GAAGA,EAAEA,CAACA;QACfA,CAACA;QAACA,IAAIA,CAACA,CAACA;YACJA,GAAGA,CAACA,CAACA,GAAGA,KAAKA,CAACA;QAClBA,CAACA;IACLA,CAACA;IACDA,IAAAA,CAACA;QACGA,MAAMA,IAAIA,KAAKA,EAAEA,CAACA;IACtBA,CAAEA;IAAAA,KAAKA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA;QACVA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IACfA,CAACA;YAACA,CAACA;QACCA,CAACA,GAAGA,EAAEA,CAACA;IACXA,CAACA;IACDA,MAAMA,GAAGA,EAAEA,CAACA;QACRA,CAACA,GAAGA,CAACA,CAACA;QACNA,CAACA,GAAGA,EAAEA,CAACA;IACXA,CAACA;IACDA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA;QACZA,KAAKA,CAACA,EAAEA,CAACA;YACLA,CAACA,EAAEA,CAACA;YACJA,KAAKA,CAACA;QAEVA,CAACA;QACDA,KAAKA,CAACA,EAAEA,CAACA;YACLA,CAACA,EAAEA,CAACA;YACJA,KAAKA,CAACA;QAEVA,CAACA;QACDA,SAASA,CAACA;YACNA,CAACA,IAAIA,CAACA,CAACA;YACPA,CAACA,GAAGA,EAAEA,CAACA;YACPA,KAAKA,CAACA;QAEVA,CAACA;IACLA,CAACA;IACDA,OAAOA,CAACA,GAAGA,EAAEA,EAAEA,CAACA;QACZA,CAACA,EAAEA,CAACA;IACRA,CAACA;IACDA,GAAGA,CAACA;QACAA,CAACA,EAAEA,CAACA;IACRA,CAACA,QAAQA,CAACA,GAAGA,CAACA,EAACA;IACfA,CAACA,GAAGA,CAACA,CAACA;IACNA,IAAIA,CAACA,GAAGA,CAACA,CAACA,IAAIA,CAACA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,CAACA;IACjCA,CAACA,CAACA,IAAIA,CAACA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,CAACA;IACzBA,CAACA,KAAKA,CAACA,CAACA;IACRA,CAACA,GAAGA,CAACA,GAAGA,EAAEA,CAACA;IACXA,IAAIA,CAACA,GAAGA,CAACA,CAACA;IACVA,MAAMA,CAACA;AACXA,CAACA;AACD,IAAI,CAAC,GAAG;IACJ,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC,CAAC;AACF,CAAC,EAAE,CAAC"}

View File

@ -557,16 +557,16 @@ sourceFile:sourceMapValidationStatements.ts
4 > (
5 > e
6 > )
7 >
8 > c
7 >
8 > {
1->Emitted(31, 5) Source(29, 7) + SourceIndex(0) name (f)
2 >Emitted(31, 10) Source(29, 12) + SourceIndex(0) name (f)
3 >Emitted(31, 11) Source(29, 13) + SourceIndex(0) name (f)
4 >Emitted(31, 12) Source(29, 14) + SourceIndex(0) name (f)
5 >Emitted(31, 13) Source(29, 15) + SourceIndex(0) name (f)
6 >Emitted(31, 14) Source(29, 16) + SourceIndex(0) name (f)
7 >Emitted(31, 15) Source(29, 7) + SourceIndex(0) name (f)
8 >Emitted(31, 16) Source(29, 8) + SourceIndex(0) name (f)
7 >Emitted(31, 15) Source(29, 17) + SourceIndex(0) name (f)
8 >Emitted(31, 16) Source(29, 18) + SourceIndex(0) name (f)
---
>>> if (obj.z < 10) {
1->^^^^^^^^
@ -581,7 +581,7 @@ sourceFile:sourceMapValidationStatements.ts
10> ^
11> ^
12> ^
1->atch (e) {
1->
>
2 > if
3 >
@ -759,16 +759,16 @@ sourceFile:sourceMapValidationStatements.ts
4 > (
5 > e1
6 > )
7 >
8 > c
7 >
8 > {
1->Emitted(42, 5) Source(38, 7) + SourceIndex(0) name (f)
2 >Emitted(42, 10) Source(38, 12) + SourceIndex(0) name (f)
3 >Emitted(42, 11) Source(38, 13) + SourceIndex(0) name (f)
4 >Emitted(42, 12) Source(38, 14) + SourceIndex(0) name (f)
5 >Emitted(42, 14) Source(38, 16) + SourceIndex(0) name (f)
6 >Emitted(42, 15) Source(38, 17) + SourceIndex(0) name (f)
7 >Emitted(42, 16) Source(38, 7) + SourceIndex(0) name (f)
8 >Emitted(42, 17) Source(38, 8) + SourceIndex(0) name (f)
7 >Emitted(42, 16) Source(38, 18) + SourceIndex(0) name (f)
8 >Emitted(42, 17) Source(38, 19) + SourceIndex(0) name (f)
---
>>> var b = e1;
1->^^^^^^^^
@ -777,7 +777,7 @@ sourceFile:sourceMapValidationStatements.ts
4 > ^^^
5 > ^^
6 > ^
1->atch (e1) {
1->
>
2 > var
3 > b

View File

@ -1,2 +1,2 @@
//// [sourceMapValidationTryCatchFinally.js.map]
{"version":3,"file":"sourceMapValidationTryCatchFinally.js","sourceRoot":"","sources":["sourceMapValidationTryCatchFinally.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,EAAE,CAAC;AACX,IAAA,CAAC;IACG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAE;AAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAT,CAAC;IACC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;QAAC,CAAC;IACC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AACf,CAAC;AACD,IAAA,CAAC;IAEG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACV,MAAM,IAAI,KAAK,EAAE,CAAC;AACtB,CACA;AAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAT,CAAC;IAEG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;QACD,CAAC;IAEG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AACf,CAAC"}
{"version":3,"file":"sourceMapValidationTryCatchFinally.js","sourceRoot":"","sources":["sourceMapValidationTryCatchFinally.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,EAAE,CAAC;AACX,IAAA,CAAC;IACG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAE;AAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACT,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;QAAC,CAAC;IACC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AACf,CAAC;AACD,IAAA,CAAC;IAEG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACV,MAAM,IAAI,KAAK,EAAE,CAAC;AACtB,CACA;AAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CACT,CAAC;IACG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;QACD,CAAC;IAEG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AACf,CAAC"}

View File

@ -91,16 +91,16 @@ sourceFile:sourceMapValidationTryCatchFinally.ts
4 > (
5 > e
6 > )
7 >
8 > c
7 >
8 > {
1->Emitted(5, 1) Source(4, 3) + SourceIndex(0)
2 >Emitted(5, 6) Source(4, 8) + SourceIndex(0)
3 >Emitted(5, 7) Source(4, 9) + SourceIndex(0)
4 >Emitted(5, 8) Source(4, 10) + SourceIndex(0)
5 >Emitted(5, 9) Source(4, 11) + SourceIndex(0)
6 >Emitted(5, 10) Source(4, 12) + SourceIndex(0)
7 >Emitted(5, 11) Source(4, 3) + SourceIndex(0)
8 >Emitted(5, 12) Source(4, 4) + SourceIndex(0)
7 >Emitted(5, 11) Source(4, 13) + SourceIndex(0)
8 >Emitted(5, 12) Source(4, 14) + SourceIndex(0)
---
>>> x = x - 1;
1->^^^^
@ -110,7 +110,7 @@ sourceFile:sourceMapValidationTryCatchFinally.ts
5 > ^^^
6 > ^
7 > ^
1->atch (e) {
1->
>
2 > x
3 > =
@ -266,16 +266,17 @@ sourceFile:sourceMapValidationTryCatchFinally.ts
4 > (
5 > e
6 > )
7 >
8 > c
7 >
>
8 > {
1->Emitted(15, 1) Source(14, 1) + SourceIndex(0)
2 >Emitted(15, 6) Source(14, 6) + SourceIndex(0)
3 >Emitted(15, 7) Source(14, 7) + SourceIndex(0)
4 >Emitted(15, 8) Source(14, 8) + SourceIndex(0)
5 >Emitted(15, 9) Source(14, 9) + SourceIndex(0)
6 >Emitted(15, 10) Source(14, 10) + SourceIndex(0)
7 >Emitted(15, 11) Source(14, 1) + SourceIndex(0)
8 >Emitted(15, 12) Source(14, 2) + SourceIndex(0)
7 >Emitted(15, 11) Source(15, 1) + SourceIndex(0)
8 >Emitted(15, 12) Source(15, 2) + SourceIndex(0)
---
>>> x = x - 1;
1->^^^^
@ -285,8 +286,7 @@ sourceFile:sourceMapValidationTryCatchFinally.ts
5 > ^^^
6 > ^
7 > ^
1->atch (e)
>{
1->
>
2 > x
3 > =