Adjust source file to be able to properly strip macros when using strippables.

This commit is contained in:
Jocelyn Le Sage
2014-05-22 09:14:25 -04:00
parent 1756e4bb17
commit 4a4dedd5e2
+1
View File
@@ -83,6 +83,7 @@ class CMockHeaderParser
source.gsub!(/(\W)(?:register|auto|static|restrict)(\W)/, '\1\2') # remove problem keywords
source.gsub!(/\s*=\s*['"a-zA-Z0-9_\.]+\s*/, '') # remove default value statements from argument lists
source.gsub!(/^(?:[\w\s]*\W)?typedef\W[^;]*/m, '') # remove typedef statements
source.gsub!(/\)(\w)/, ') \1') # add space between parenthese and alphanumeric
source.gsub!(/(^|\W+)(?:#{@c_strippables.join('|')})(?=$|\W+)/,'\1') unless @c_strippables.empty? # remove known attributes slated to be stripped
#scan for functions which return function pointers, because they are a pain