|
|
|
@ -216,6 +216,30 @@
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function compareWindowsFilename(lhs, rhs) { |
|
|
|
|
function tildeCompare(lhs, rhs) { |
|
|
|
|
var lhsTilde = lhs.indexOf("~"); |
|
|
|
|
var rhsTilde = rhs.indexOf("~"); |
|
|
|
|
if (lhsTilde >= 0) { |
|
|
|
|
lhs = lhs.substr(0, lhsTilde); |
|
|
|
|
rhs = rhs.substr(0, lhsTilde); |
|
|
|
|
} |
|
|
|
|
if (rhsTilde >= 0) { |
|
|
|
|
lhs = lhs.substr(0, rhsTilde); |
|
|
|
|
rhs = rhs.substr(0, rhsTilde); |
|
|
|
|
} |
|
|
|
|
return lhs === rhs; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lhs = lhs.toLowerCase().split('\\'); |
|
|
|
|
rhs = rhs.toLowerCase().split('\\'); |
|
|
|
|
if (lhs.length != rhs.length) return false; |
|
|
|
|
for (var i = 0; i < lhs.length; ++i) { |
|
|
|
|
if (!tildeCompare(lhs[i], rhs[i])) return false; |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var directive = /^\s*(\.|([_A-Z]+\b))/; |
|
|
|
|
var labelDefinition = /^([a-zA-Z0-9$_.]+):/; |
|
|
|
|
var commentOnly = /^\s*([#@;]|\/\/).*/; |
|
|
|
@ -223,8 +247,10 @@
|
|
|
|
|
var fileFind = /^; File\s+(.*)$/; |
|
|
|
|
var inMain = false; |
|
|
|
|
var sourceTag = /^;\s*([0-9]+)\s*:/; |
|
|
|
|
var ignoreAll = /^include listing\.inc$/; |
|
|
|
|
var ignoreAll = /^\s*include listing\.inc$/; |
|
|
|
|
var source = null; |
|
|
|
|
var titleFind = /^\s*TITLE\s*(.*)/; |
|
|
|
|
var title = null; |
|
|
|
|
var result = []; |
|
|
|
|
|
|
|
|
|
function demangle(line) { |
|
|
|
@ -304,9 +330,11 @@
|
|
|
|
|
} |
|
|
|
|
line = demangle(line); |
|
|
|
|
|
|
|
|
|
if (title === null && !!(match = line.match(titleFind))) { |
|
|
|
|
title = match[1]; |
|
|
|
|
} |
|
|
|
|
if (!!(match = line.match(fileFind))) { |
|
|
|
|
// NB relies on magic name from properties; TODO fix this (or at least share the name instead of repeating it here)
|
|
|
|
|
inMain = !!match[1].match(/\\GccExplorer.cpp$/); |
|
|
|
|
inMain = compareWindowsFilename(match[1], title); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!!(match = line.match(sourceTag))) { |
|
|
|
|