File tree Expand file tree Collapse file tree 1 file changed +33
-2
lines changed Expand file tree Collapse file tree 1 file changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ def processLine( line, state ):
203
203
return state
204
204
205
205
206
- def processFile ():
206
+ def processFiles ():
207
207
headerFile = open ( "../core/src/fieldml_api.h" )
208
208
209
209
state = ParseState .InHeader
@@ -235,6 +235,37 @@ def processFile():
235
235
236
236
headerFile .close ()
237
237
238
+ headerFile = open ( "../io/src/FieldmlIoApi.h" )
239
+
240
+ state = ParseState .InHeader
241
+ inComment = False
242
+
243
+ for line in headerFile :
244
+ startSegment = 0
245
+
246
+ if ( inComment ):
247
+ pos = line .find ( "*/" )
248
+ if ( pos == - 1 ):
249
+ continue
250
+ inComment = False
251
+ startSegment = pos + 2
252
+
253
+ #Does not cope with mixing line and block comments.
254
+ endSegment = line .find ( "/*" , startSegment )
255
+ while ( endSegment != - 1 ):
256
+ state = processLine ( line [ startSegment : endSegment ], state )
257
+ startSegment = line .find ( "*/" , endSegment + 2 )
258
+ if ( startSegment == - 1 ):
259
+ break
260
+ endSegment = line .find ( "/*" , startSegment )
261
+
262
+ if ( startSegment == - 1 ):
263
+ inComment = True
264
+ else :
265
+ state = processLine ( line [ startSegment : ], state )
266
+
267
+ headerFile .close ()
268
+
238
269
239
270
writeHeader ()
240
271
@@ -261,4 +292,4 @@ def processFile():
261
292
262
293
writeFooter ()
263
294
264
- processFile ()
295
+ processFiles ()
You can’t perform that action at this time.
0 commit comments