diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index e5dc722d7ea..a5489b670c1 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -119,6 +119,9 @@ module ts.BreakpointResolver { case SyntaxKind.ThrowStatement: return spanInThrowStatement(node); + case SyntaxKind.ExportAssignment: + return spanInExportAssignment(node); + case SyntaxKind.BinaryExpression: case SyntaxKind.PostfixOperator: case SyntaxKind.PrefixOperator: @@ -351,6 +354,10 @@ module ts.BreakpointResolver { return textSpan(throwStatement, throwStatement.expression); } + function spanInExportAssignment(exportAssignment: ExportAssignment): TypeScript.TextSpan { + return textSpan(exportAssignment, exportAssignment.exportName); + } + function spanInExpression(expression: Expression): TypeScript.TextSpan { //TODO (pick this up later) for now lets fix do-while baseline if (node.parent.kind === SyntaxKind.DoStatement) { // Set span as if on while keyword diff --git a/tests/baselines/reference/bpSpan_exportAssignment.baseline b/tests/baselines/reference/bpSpan_exportAssignment.baseline new file mode 100644 index 00000000000..19e4a4ba9bb --- /dev/null +++ b/tests/baselines/reference/bpSpan_exportAssignment.baseline @@ -0,0 +1,17 @@ + +1 >class a { + + ~~~~~~~~~~ => Pos: (0 to 9) SpanInfo: undefined +-------------------------------- +2 > public c; + + ~~~~~~~~~~~~~~ => Pos: (10 to 23) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (24 to 25) SpanInfo: undefined +-------------------------------- +4 >export = a; + ~~~~~~~~~~~ => Pos: (26 to 36) SpanInfo: {"start":26,"length":10} + >export = a + >:=> (line 4, col 0) to (line 4, col 10) \ No newline at end of file diff --git a/tests/cases/fourslash_old/breakpointValidationExportAssignment.ts b/tests/cases/fourslash/breakpointValidationExportAssignment.ts similarity index 100% rename from tests/cases/fourslash_old/breakpointValidationExportAssignment.ts rename to tests/cases/fourslash/breakpointValidationExportAssignment.ts