mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-22 19:33:29 +01:00
Fixed issue with single include generator
- well, partially. The problem is it is matching /* … */ comments by assuming the intervening lines begin with whitespace followed by a *. This avoids it having to maintain extra state, but makes it brittle. It was matching *it = " " + *it; as a comment! It now matches on a single space followed by a * and this seems to work for now - but it probably needs to move to proper stateful comment handling.
This commit is contained in:
parent
ca42b2c585
commit
785db43bb2
@ -16,7 +16,7 @@ ifParser = re.compile( r'\s*#ifndef TWOBLUECUBES_CATCH_.*_INCLUDED')
|
||||
endIfParser = re.compile( r'\s*#endif // TWOBLUECUBES_CATCH_.*_INCLUDED')
|
||||
ifImplParser = re.compile( r'\s*#ifdef CATCH_CONFIG_RUNNER' )
|
||||
commentParser1 = re.compile( r'^\s*/\*')
|
||||
commentParser2 = re.compile( r'^\s*\*')
|
||||
commentParser2 = re.compile( r'^ \*')
|
||||
blankParser = re.compile( r'^\s*$')
|
||||
seenHeaders = set([])
|
||||
rootPath = os.path.join( catchPath, 'include/' )
|
||||
|
Loading…
Reference in New Issue
Block a user