File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,10 +133,12 @@ def p_intlit(self, p):
133133
134134 if p [1 ].startswith ("'" ):
135135 value = int .from_bytes (_unescape_string (p [1 ][1 :- 1 ]), "big" )
136- elif p [1 ].startswith ("$" ) or p [1 ].startswith ("0X" ) or p [1 ].startswith ("0x" ):
137- value = int (p [1 ].lstrip ("$0Xx" ), 16 )
136+ elif p [1 ].startswith ("$" ):
137+ value = int (p [1 ][1 :], 16 )
138+ elif p [1 ].startswith ("0X" ) or p [1 ].startswith ("0x" ):
139+ value = int (p [1 ][2 :], 16 )
138140 elif p [1 ].startswith ("0B" ) or p [1 ].startswith ("0b" ):
139- value = int (p [1 ]. lstrip ( "0Bb" ) , 2 )
141+ value = int (p [1 ][ 2 :] , 2 )
140142 elif p [1 ].startswith ("0" ):
141143 value = int (p [1 ], 8 )
142144 else :
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ resource '_FOO' (2) {
197197 },
198198 " " ,
199199 8 ,
200- 0 ,
200+ 0b0 + 0B0 + $0 + 0x0 + 0X0 ,
201201 $" "
202202};
203203
You can’t perform that action at this time.
0 commit comments