File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ private function initialize()
129129 self ::TOKEN_OPEN_PHPDOC => '/ \\* \\*(?= \\s) ' ,
130130 self ::TOKEN_CLOSE_PHPDOC => '\\*/ ' ,
131131 self ::TOKEN_PHPDOC_TAG => '@[a-z-]++ ' ,
132- self ::TOKEN_PHPDOC_EOL => '\\r?+ \\n \\ h *+(?: \\*(?!/) \\ h*+ )? ' ,
132+ self ::TOKEN_PHPDOC_EOL => '\\r?+ \\n[ \\ x09 \\ x20] *+(?: \\*(?!/))? ' ,
133133
134134 self ::TOKEN_FLOAT => '(?:-?[0-9]++ \\.[0-9]*+(?:e-?[0-9]++)?)|(?:-?[0-9]*+ \\.[0-9]++(?:e-?[0-9]++)?)|(?:-?[0-9]++e-?[0-9]++) ' ,
135135 self ::TOKEN_INTEGER => '-?[0-9]++ ' ,
@@ -140,7 +140,7 @@ private function initialize()
140140 self ::TOKEN_THIS_VARIABLE => '\\$this \\b ' ,
141141 self ::TOKEN_VARIABLE => '\\$[a-z_ \\x7F- \\xFF][0-9a-z_ \\x7F- \\xFF]*+ ' ,
142142
143- self ::TOKEN_HORIZONTAL_WS => '\\ h ++ ' ,
143+ self ::TOKEN_HORIZONTAL_WS => '[ \\ x09 \\ x20] ++ ' ,
144144
145145 // anything but TOKEN_CLOSE_PHPDOC or TOKEN_HORIZONTAL_WS or TOKEN_EOL
146146 self ::TOKEN_OTHER => '(?:(?! \\*/)[^ \\s])++ ' ,
Original file line number Diff line number Diff line change @@ -299,6 +299,12 @@ public function provideParseData(): array
299299 new IdentifierTypeNode ('array ' ),
300300 Lexer::TOKEN_OPEN_SQUARE_BRACKET ,
301301 ],
302+ [
303+ "? \t\xA009 " , // edge-case with \h
304+ new NullableTypeNode (
305+ new IdentifierTypeNode ("\xA009 " )
306+ ),
307+ ],
302308 ];
303309 }
304310
You can’t perform that action at this time.
0 commit comments