mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-06-05 21:15:20 +00:00
Switch places in the extern C regex to speed up mock generation
This commit is contained in:
committed by
Łukasz Żegliński
parent
3b443e551d
commit
50de50d239
@@ -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