Add treat_inline configuration option

This commit is contained in:
laurensmiers
2019-11-10 18:39:20 +01:00
committed by laurens
parent ee3ae84e64
commit dbb2f4964c
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -29,6 +29,7 @@ class CMockConfig
:when_ptr => :compare_data, #the options being :compare_ptr, :compare_data, or :smart
:verbosity => 2, #the options being 0 errors only, 1 warnings and errors, 2 normal info, 3 verbose
:treat_externs => :exclude, #the options being :include or :exclude
:treat_inline => :exclude, #the options being :include or :exclude
:callback_include_count => true,
:callback_after_arg_check => false,
:includes => nil,
+3 -1
View File
@@ -6,7 +6,7 @@
class CMockHeaderParser
attr_accessor :funcs, :c_attr_noconst, :c_attributes, :treat_as_void, :treat_externs
attr_accessor :funcs, :c_attr_noconst, :c_attributes, :treat_as_void, :treat_externs, :treat_inline
def initialize(cfg)
@funcs = []
@@ -24,7 +24,9 @@ class CMockHeaderParser
@local_as_void = @treat_as_void
@verbosity = cfg.verbosity
@treat_externs = cfg.treat_externs
@treat_inline = cfg.treat_inline
@c_strippables += ['extern'] if (@treat_externs == :include) #we'll need to remove the attribute if we're allowing externs
@c_strippables += ['inline'] if (@treat_inline == :include) #we'll need to remove the attribute if we're allowing externs
end
def parse(name, source)