mirror of https://github.com/Icinga/icinga2.git
parent
79a7a0be92
commit
b924941488
|
@ -34,8 +34,6 @@ using namespace icinga;
|
||||||
do { \
|
do { \
|
||||||
yylloc->Path = yyextra->GetPath(); \
|
yylloc->Path = yyextra->GetPath(); \
|
||||||
yylloc->FirstLine = yylineno; \
|
yylloc->FirstLine = yylineno; \
|
||||||
if (yycolumn < 1) \
|
|
||||||
yycolumn = 1; \
|
|
||||||
yylloc->FirstColumn = yycolumn; \
|
yylloc->FirstColumn = yycolumn; \
|
||||||
yylloc->LastLine = yylineno; \
|
yylloc->LastLine = yylineno; \
|
||||||
yylloc->LastColumn = yycolumn + yyleng - 1; \
|
yylloc->LastColumn = yycolumn + yyleng - 1; \
|
||||||
|
|
|
@ -94,6 +94,11 @@ void icinga::ShowCodeFragment(std::ostream& out, const DebugInfo& di, bool verbo
|
||||||
if (lineno == di.LastLine)
|
if (lineno == di.LastLine)
|
||||||
end = di.LastColumn;
|
end = di.LastColumn;
|
||||||
|
|
||||||
|
if (start < 0) {
|
||||||
|
end -= start;
|
||||||
|
start = 0;
|
||||||
|
}
|
||||||
|
|
||||||
out << String(pathInfo.GetLength(), ' ');
|
out << String(pathInfo.GetLength(), ' ');
|
||||||
out << String(start, ' ');
|
out << String(start, ' ');
|
||||||
out << String(end - start, '^');
|
out << String(end - start, '^');
|
||||||
|
|
Loading…
Reference in New Issue