mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-07-28 14:57:49 +00:00
Merge pull request #359 from lukzeg/feature/358_cmock_speed_up_generation
Switch places in the extern C regex to speed up mock generation
This commit is contained in:
@@ -245,8 +245,8 @@ class CMockHeaderParser
|
||||
source.gsub!(/__attribute(?:__)?\s*\(\(+.*\)\)+/, '')
|
||||
|
||||
# remove preprocessor statements and extern "C"
|
||||
source.gsub!(/^\s*#.*/, '')
|
||||
source.gsub!(/extern\s+\"C\"\s*\{/, '')
|
||||
source.gsub!(/^\s*#.*/, '')
|
||||
|
||||
# enums, unions, structs, and typedefs can all contain things (e.g. function pointers) that parse like function prototypes, so yank them
|
||||
# forward declared structs are removed before struct definitions so they don't mess up real thing later. we leave structs keywords in function prototypes
|
||||
|
||||
Reference in New Issue
Block a user