mirror of
https://github.com/nlohmann/json.git
synced 2026-03-10 19:21:26 +00:00
🐛 fix lexer to properly cope with repeated comments #2330
This commit is contained in:
@@ -241,5 +241,8 @@ TEST_CASE("lexer class")
|
||||
CHECK((scan_string("/* true */", true) == json::lexer::token_type::end_of_input));
|
||||
CHECK((scan_string("/*/**/", true) == json::lexer::token_type::end_of_input));
|
||||
CHECK((scan_string("/*/* */", true) == json::lexer::token_type::end_of_input));
|
||||
|
||||
CHECK((scan_string("//\n//\n", true) == json::lexer::token_type::end_of_input));
|
||||
CHECK((scan_string("/**//**//**/", true) == json::lexer::token_type::end_of_input));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user