Better handling of inline functions with declaration in header

This commit is contained in:
laurensmiers
2019-11-10 18:39:20 +01:00
committed by laurens
parent 7a32429bd2
commit 01536c4a67
2 changed files with 21 additions and 2 deletions
+7
View File
@@ -112,6 +112,13 @@ class CMockHeaderParser
end
end
if (@treat_inline == :include)
# Functions having "{ }" at this point are/were inline functions,
# User wants them in so 'disguise' them as normal functions with the ";"
source.gsub!("{ }", ";")
end
# remove function definitions by stripping off the arguments right now
source.gsub!(/\([^\)]*\)\s*\{[^\}]*\}/m, ";")