Breakpoints in import declaration

This commit is contained in:
Sheetal Nandi
2014-09-02 16:10:08 -07:00
parent 2905217d4e
commit d235caf990
3 changed files with 46 additions and 0 deletions

View File

@@ -122,6 +122,9 @@ module ts.BreakpointResolver {
case SyntaxKind.ExportAssignment:
return spanInExportAssignment(<ExportAssignment>node);
case SyntaxKind.ImportDeclaration:
return spanInImportDeclaration(<ImportDeclaration>node);
case SyntaxKind.BinaryExpression:
case SyntaxKind.PostfixOperator:
case SyntaxKind.PrefixOperator:
@@ -358,6 +361,10 @@ module ts.BreakpointResolver {
return textSpan(exportAssignment, exportAssignment.exportName);
}
function spanInImportDeclaration(importDeclaration: ImportDeclaration): TypeScript.TextSpan {
return textSpan(importDeclaration, importDeclaration.entityName || importDeclaration.externalModuleName);
}
function spanInExpression(expression: Expression): TypeScript.TextSpan {
//TODO (pick this up later) for now lets fix do-while baseline
if (node.parent.kind === SyntaxKind.DoStatement) {