mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Breakpoint span in the debugger statement
This commit is contained in:
@@ -80,6 +80,9 @@ module ts.BreakpointResolver {
|
||||
case SyntaxKind.DoStatement:
|
||||
return spanInDoStatement(<DoStatement>node);
|
||||
|
||||
case SyntaxKind.DebuggerStatement:
|
||||
return spanInDebuggerStatement(node);
|
||||
|
||||
// Tokens:
|
||||
case SyntaxKind.SemicolonToken:
|
||||
case SyntaxKind.EndOfFileToken:
|
||||
@@ -235,6 +238,11 @@ module ts.BreakpointResolver {
|
||||
return spanInNode(doStatement.statement);
|
||||
}
|
||||
|
||||
function spanInDebuggerStatement(node: Node): TypeScript.TextSpan {
|
||||
// Set breakpoint on debugger keyword
|
||||
return textSpan(node.getChildAt(0, sourceFile));
|
||||
}
|
||||
|
||||
// Tokens:
|
||||
function spanInCommaToken(node: Node): TypeScript.TextSpan {
|
||||
switch (node.parent.kind) {
|
||||
|
||||
Reference in New Issue
Block a user