Add detailed location to XML output (#2122)

* Add detailed location to XML output

* Fixing build failures

* less cryptic regulary expressions

* correcting typo in test

* Adding file letter to the location attribute, and cleaning up the regular expression in the tests.

* Add remaining test expected output files for XML changes

* spacing fix, adding documentation on changes
This commit is contained in:
Pieter Kapsenberg
2020-01-20 14:08:13 -05:00
committed by Wilson Snyder
parent 0352ceea44
commit 4a122fd0f2
23 changed files with 165 additions and 147 deletions
+9
View File
@@ -158,6 +158,15 @@ FileLine::FileLine(FileLine::EmptySecret) {
}
}
const string FileLine::xmlDetailedLocation() const {
return "loc=\"" +
cvtToStr(filenameLetters()) + "," +
cvtToStr(firstLineno()) + "," +
cvtToStr(firstColumn()) + "," +
cvtToStr(lastLineno()) + "," +
cvtToStr(lastColumn()) + "\"";
}
string FileLine::lineDirectiveStrg(int enterExit) const {
char numbuf[20]; sprintf(numbuf, "%d", lastLineno());
char levelbuf[20]; sprintf(levelbuf, "%d", enterExit);