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:
parent
dd77f7d593
commit
a5e761dddb
3 changed files with 61 additions and 1 deletions
|
@ -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];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue