File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ private function initialize()
132132 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]++) ' ,
135- self ::TOKEN_INTEGER => '-?[0-9]++ ' ,
135+ self ::TOKEN_INTEGER => '-?(?:(?:0b [0-1]++)|(?:0o[0-7]++)|(?:0x[0-9a-f]++)|(?:[0- 9]++)) ' ,
136136 self ::TOKEN_SINGLE_QUOTED_STRING => '\'(?: \\\\.|[^ \'\\r \\n])*+ \'' ,
137137 self ::TOKEN_DOUBLE_QUOTED_STRING => '"(?: \\\\.|[^" \\r \\n])*+" ' ,
138138
Original file line number Diff line number Diff line change @@ -79,6 +79,26 @@ public function provideParseData(): array
7979 '123 ' ,
8080 new ConstExprIntegerNode ('123 ' ),
8181 ],
82+ [
83+ '0b0110101 ' ,
84+ new ConstExprIntegerNode ('0b0110101 ' ),
85+ ],
86+ [
87+ '0o777 ' ,
88+ new ConstExprIntegerNode ('0o777 ' ),
89+ ],
90+ [
91+ '0x7Fb4 ' ,
92+ new ConstExprIntegerNode ('0x7Fb4 ' ),
93+ ],
94+ [
95+ '-0O777 ' ,
96+ new ConstExprIntegerNode ('-0O777 ' ),
97+ ],
98+ [
99+ '-0X7Fb4 ' ,
100+ new ConstExprIntegerNode ('-0X7Fb4 ' ),
101+ ],
82102 [
83103 '123.4 ' ,
84104 new ConstExprFloatNode ('123.4 ' ),
You can’t perform that action at this time.
0 commit comments