Skip to content

Commit 91af313

Browse files
committed
Fix comment regex, thanks @kukulich!
1 parent 58375a9 commit 91af313

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Lexer/Lexer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ private function generateRegexp(): string
163163
self::TOKEN_CLOSE_CURLY_BRACKET => '\\}',
164164

165165
self::TOKEN_COMMA => ',',
166-
self::TOKEN_COMMENT => '(?<![:/])\/\/[^\\r\\n]*',
166+
self::TOKEN_COMMENT => '(?<![:/])\/\/[^\\r\\n]*(?=\n|\r|\*/)',
167167
self::TOKEN_VARIADIC => '\\.\\.\\.',
168168
self::TOKEN_DOUBLE_COLON => '::',
169169
self::TOKEN_DOUBLE_ARROW => '=>',

0 commit comments

Comments
 (0)