Handle headers which only have inline-function-declarations

This means there is NO opening bracket, since there are no struct
declarations or inline function definitions.
This commit is contained in:
laurens
2020-01-14 22:18:17 +01:00
committed by laurensmiers
parent 7a5d712d79
commit 3254aef5e5
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ class CMockHeaderParser
first_open_bracket = inline_function_match.post_match.index("{")
first_semicolon = inline_function_match.post_match.index(";")
if first_semicolon < first_open_bracket
if first_open_bracket.nil? or first_semicolon < first_open_bracket
puts "DECLARATION, IGNORE"
source = inline_function_match.pre_match + inline_function_match.post_match
next