File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -182,13 +182,14 @@ def __init__(self):
182
182
# and the expansion in group 3.
183
183
_define_directive_re = re .compile (r'\s*#\s*define\s+(\w+)' +
184
184
r'(?:\s+|\((\w+)\)\s*)' +
185
- r'(.+)(?:/[*/])? ' )
185
+ r'(.+)' )
186
186
187
187
def read_line (self , line ):
188
188
m = re .match (self ._define_directive_re , line )
189
189
if not m :
190
190
return
191
191
name , parameter , expansion = m .groups ()
192
+ expansion = re .sub (r'/\*.*?\*/|//.*' , r' ' , expansion )
192
193
if name .endswith ('_FLAG' ) or name .endswith ('MASK' ):
193
194
# Macro only to build actual values
194
195
return
@@ -238,6 +239,9 @@ def read_line(self, line):
238
239
239
240
def read_file (self , header_file ):
240
241
for line in header_file :
242
+ while line .endswith ('\\ \n ' ):
243
+ cont = header_file .next ()
244
+ line = line [:- 2 ] + cont
241
245
self .read_line (line )
242
246
243
247
def make_return_case (self , name ):
You can’t perform that action at this time.
0 commit comments