mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Fixed single header generator for generating no-impl header
This commit is contained in:
parent
7f1156d477
commit
b198856f79
@ -14,7 +14,7 @@ guardParser = re.compile( r'\s*#.*TWOBLUECUBES_CATCH_.*_INCLUDED')
|
|||||||
defineParser = re.compile( r'\s*#define')
|
defineParser = re.compile( r'\s*#define')
|
||||||
ifParser = re.compile( r'\s*#ifndef TWOBLUECUBES_CATCH_.*_INCLUDED')
|
ifParser = re.compile( r'\s*#ifndef TWOBLUECUBES_CATCH_.*_INCLUDED')
|
||||||
endIfParser = re.compile( r'\s*#endif // TWOBLUECUBES_CATCH_.*_INCLUDED')
|
endIfParser = re.compile( r'\s*#endif // TWOBLUECUBES_CATCH_.*_INCLUDED')
|
||||||
ifImplParser = re.compile( r'\s*#if.*(CATCH_CONFIG_MAIN|CATCH_CONFIG_RUNNER)')
|
ifImplParser = re.compile( r'\s*#ifdef CATCH_CONFIG_RUNNER' )
|
||||||
commentParser1 = re.compile( r'^\s*/\*')
|
commentParser1 = re.compile( r'^\s*/\*')
|
||||||
commentParser2 = re.compile( r'^\s*\*')
|
commentParser2 = re.compile( r'^\s*\*')
|
||||||
blankParser = re.compile( r'^\s*$')
|
blankParser = re.compile( r'^\s*$')
|
||||||
@ -59,6 +59,8 @@ def parseFile( path, filename ):
|
|||||||
ifdefs = ifdefs + 1
|
ifdefs = ifdefs + 1
|
||||||
elif endIfParser.match( line ):
|
elif endIfParser.match( line ):
|
||||||
ifdefs = ifdefs - 1
|
ifdefs = ifdefs - 1
|
||||||
|
if ifdefs == implIfDefs:
|
||||||
|
implIfDefs = -1
|
||||||
m = includesParser.match( line )
|
m = includesParser.match( line )
|
||||||
if m:
|
if m:
|
||||||
header = m.group(1)
|
header = m.group(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user