Rewrote the ansi parser to exactly callback on color setting, so now just need to clean this all up and fix a few little bugs.
This commit is contained in:
parent
96ee16e598
commit
89a70f398a
9 changed files with 274 additions and 126 deletions
|
@ -63,7 +63,11 @@ TEST_CASE("test out ragel parser", "[gui]") {
|
|||
std::cout << colors;
|
||||
|
||||
|
||||
bool good = ansi.parse(colors_utf, [&](sf::Color bgcolor, sf::Color color, wchar_t ch) {
|
||||
bool good = ansi.parse(colors_utf,
|
||||
[&](sf::Color color, sf::Color bgcolor){
|
||||
// ignore color
|
||||
},
|
||||
[&](wchar_t ch) {
|
||||
bool correct_char = ch == '#' || ch == ' ' || ch == '\n' || ch == '\r';
|
||||
REQUIRE(correct_char);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue