add tests for comment skipping

This commit is contained in:
Niels Lohmann 2020-06-19 13:10:35 +02:00
parent 74520d8bb0
commit 0585ecc56b
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
3 changed files with 58 additions and 3 deletions

View file

@ -1507,7 +1507,13 @@ scan_number_done:
error_message = "invalid comment";
return token_type::parse_error;
}
get();
// skip following whitespace
do
{
get();
}
while (current == ' ' or current == '\t' or current == '\n' or current == '\r');
}
switch (current)