Skip to content
Snippets Groups Projects
Commit cab12289 authored by Henning Glawe's avatar Henning Glawe
Browse files

keep octal/hex prefix out of literal int match groups

parent c095b244
No related branches found
No related tags found
No related merge requests found
...@@ -39,8 +39,8 @@ cRE_literal = re.compile( ...@@ -39,8 +39,8 @@ cRE_literal = re.compile(
r'(?:\.\d*)?' + #cover decimals if present r'(?:\.\d*)?' + #cover decimals if present
r'(?:[eE][+-]\d+)?' # exponential part if present r'(?:[eE][+-]\d+)?' # exponential part if present
r')'), r')'),
r'(?P<octal_int>0[0-7]+)', r'0x(?P<hex_int>[0-9a-fA-F]+)',
r'(?P<hex_int>0x[0-9a-fA-F]+)', r'0(?P<octal_int>[0-7]+)',
r'(?P<decimal_int>[+-]?\d+)', # integer with optional sign r'(?P<decimal_int>[+-]?\d+)', # integer with optional sign
]) + r')' ]) + r')'
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment