aboutsummaryrefslogtreecommitdiff
path: root/lib/utils.js
diff options
context:
space:
mode:
authorMatt Godbolt <matt@godbolt.org>2017-01-17 21:37:28 -0600
committerMatt Godbolt <matt@godbolt.org>2017-01-17 21:37:32 -0600
commitccd863e7a13dae2ce0b72e86a748c9a7dbef5e78 (patch)
treec6c0f743da580c799207f4e9b1fe8086f31be34f /lib/utils.js
parent14ff8ebb8065f3b4132c9a7ac35f97204497073f (diff)
downloadcompiler-explorer-ccd863e7a13dae2ce0b72e86a748c9a7dbef5e78.tar.gz
compiler-explorer-ccd863e7a13dae2ce0b72e86a748c9a7dbef5e78.zip
Bunch of TODOs; inline warnings/errors etc
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/utils.js b/lib/utils.js
index 8bc0ba59b..159d3fdd1 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -50,7 +50,7 @@ function expandTabs(line) {
exports.expandTabs = expandTabs;
function parseOutput(lines, inputFilename) {
- var re = /^<source>[:(]([0-9]+)(:[0-9]+:)?[):]*\s*(.*)/;
+ var re = /^<source>[:(]([0-9]+)(:([0-9]+):)?[):]*\s*(.*)/;
var result = [];
eachLine(lines, function (line) {
line = line.trim().replace(inputFilename, '<source>');
@@ -58,7 +58,11 @@ function parseOutput(lines, inputFilename) {
var lineObj = {text: line};
var match = line.match(re);
if (match) {
- lineObj.tag = {line: parseInt(match[1]), text: match[3].trim()};
+ lineObj.tag = {
+ line: parseInt(match[1]),
+ column: parseInt(match[3] || "0"),
+ text: match[4].trim()
+ };
}
result.push(lineObj);
}