mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
LR0: Parser table diagnostics formatting
This commit is contained in:
parent
6d37c467cb
commit
42d1a420ef
1 changed files with 4 additions and 4 deletions
|
@ -257,9 +257,9 @@ std::string LR0::dump () const
|
||||||
for (auto& terminal : _terminals)
|
for (auto& terminal : _terminals)
|
||||||
{
|
{
|
||||||
auto data = _actions[state].at (terminal);
|
auto data = _actions[state].at (terminal);
|
||||||
Color color (data[0] == 'r' ? "black on rgb525" :
|
Color color (data[0] == 'r' ? "rgb535 on rgb512" :
|
||||||
data[0] == 's' ? "black on rgb420" :
|
data[0] == 's' ? "rgb045 on rgb015" :
|
||||||
data[0] == 'a' ? "black on rgb031" :
|
data[0] == 'a' ? "rgb154 on rgb031" :
|
||||||
"");
|
"");
|
||||||
t.set (row, col++, data, color);
|
t.set (row, col++, data, color);
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ std::string LR0::dump () const
|
||||||
for (auto& rule : _rules)
|
for (auto& rule : _rules)
|
||||||
{
|
{
|
||||||
auto data = _goto[state].at (rule);
|
auto data = _goto[state].at (rule);
|
||||||
Color color (data != "" ? "black on rgb420" : "");
|
Color color (data != "" ? "rgb045 on rgb015" : "");
|
||||||
t.set (row, col++, data, color);
|
t.set (row, col++, data, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue