1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 09:31:16 +02:00

Fix comments parsing

Fixed the parsing of multiline strings ending with an even number of
stars, like /** this **/.
Added test cases for comments.
This commit is contained in:
Guillaume Maudoux 2016-11-13 17:06:04 +01:00
parent dd77f7d593
commit a5e761dddb
3 changed files with 61 additions and 1 deletions

View file

@ -189,7 +189,7 @@ or { return OR_KW; }
[ \t\r\n]+ /* eat up whitespace */
\#[^\r\n]* /* single-line comments */
\/\*([^*]|\*[^\/])*\*\/ /* long comments */
\/\*([^*]|\*+[^*/])*\*+\/ /* long comments */
. return yytext[0];