parent
68e6a440ff
commit
af051a3787
|
@ -2822,9 +2822,9 @@ void Tokenizer::simplifyCaseRange()
|
|||
for (char i = end - 1; i > start; i--) {
|
||||
tok->insertToken(":");
|
||||
if (i == '\\') {
|
||||
tok->insertToken(std::string("\'\\") + i + '\'');
|
||||
tok->insertToken(std::string("\'\\") + i + '\'');
|
||||
} else {
|
||||
tok->insertToken(std::string(1, '\'') + i + '\'');
|
||||
tok->insertToken(std::string(1, '\'') + i + '\'');
|
||||
}
|
||||
tok->insertToken("case");
|
||||
}
|
||||
|
|
|
@ -7114,7 +7114,7 @@ private:
|
|||
|
||||
ASSERT_EQUALS("void f ( ) { switch ( x ) { case 'a' : case 'b' : case 'c' : ; } }", tokenizeAndStringify("void f() { switch(x) { case 'a' ... 'c': } }"));
|
||||
ASSERT_EQUALS("void f ( ) { switch ( x ) { case 'c' . . . 'a' : ; } }", tokenizeAndStringify("void f() { switch(x) { case 'c' ... 'a': } }"));
|
||||
|
||||
|
||||
ASSERT_EQUALS("void f ( ) { switch ( x ) { case '[' : case '\\\\' : case ']' : ; } }", tokenizeAndStringify("void f() { switch(x) { case '[' ... ']': } }"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue