From 109f845e4938ac7f213ebfb15f8d55c5135fc2ad Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 30 Dec 2010 10:32:41 -0800 Subject: [PATCH] debugger: style --- lib/_debugger.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/_debugger.js b/lib/_debugger.js index f73d13e0f0a..07a02cc8ce7 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -357,17 +357,15 @@ Client.prototype.step = function(action, count, cb) { var helpMessage = "Commands: run, print, step, next, continue, scripts, backtrace, version, quit"; -function SourceUnderline(source_text, position) { - if (!source_text) { - return; - } +function SourceUnderline(sourceText, position) { + if (!sourceText) return; // Create an underline with a caret pointing to the source position. If the // source contains a tab character the underline will have a tab character in // the same place otherwise the underline will have a space character. var underline = ''; for (var i = 0; i < position; i++) { - if (source_text[i] == '\t') { + if (sourceText[i] == '\t') { underline += '\t'; } else { underline += ' '; @@ -376,7 +374,7 @@ function SourceUnderline(source_text, position) { underline += '^'; // Return the source line text with the underline beneath. - return source_text + '\n' + underline; + return sourceText + '\n' + underline; } function SourceInfo(body) { @@ -389,10 +387,8 @@ function SourceInfo(body) { result += '[unnamed]'; } } - result += ' line '; + result += ':'; result += body.sourceLine + 1; - result += ' column '; - result += body.sourceColumn + 1; return result; }