Switch places in the extern C regex to speed up mock generation

This commit is contained in:
Lukasz Zeglinski
2021-05-09 22:09:47 +02:00
committed by Łukasz Żegliński
parent 3b443e551d
commit 50de50d239
+1 -1
View File
@@ -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