Skip to content

Commit fcafc37

Browse files
committed
Update PP_NUMBER regex definition
The previous regex escaped the digit separator ' as \' - necessary only because the string itself was '' single-quoted. This commit switches to use double-quote "" for the string and removes the now unneeded escape.
1 parent 4207a31 commit fcafc37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pcpp/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def t_CPP_LINECONT(t):
113113

114114
# Preprocessor number
115115
def PP_NUMBER(t):
116-
r'\.?\d(\.|[\w_]|\'[\w_]|[eEpP][-+])*'
116+
r"\.?\d(?:\.|[\w_]|'[\w_]|[eEpP][-+])*"
117117
return t
118118

119119
t_PP_NUMBER = PP_NUMBER

0 commit comments

Comments
 (0)