C# property generator script now strips out
any comments inserted after the property macro.
E.g. the following macro was breaking the script due to the // deprecated comment
DALI_PROPERTY_REGISTRATION( Toolkit, Button, "unselectedStateImage", MAP, UNSELECTED_STATE_IMAGE ) // Deprecated property
Change-Id: Ifbbd45c71a44768c50d9bd2735d5aa0c5f4ddb7d
# Extract the property name, type
property = $propertyStruct.new;
# Extract the property name, type
property = $propertyStruct.new;
+ #First strip out any comments at the end of the macro, some have text like // deprecated
+ commentIndex = propertyMacro.index("//");
+
+ if( commentIndex )
+ propertyMacro = propertyMacro.slice(0..commentIndex-1)
+ end
+
+
# Split the macro definition by comma and quotes, close bracket and delete any empty segments
data = propertyMacro.split(/[\s,")]/).reject { |s| s.empty? }
# Split the macro definition by comma and quotes, close bracket and delete any empty segments
data = propertyMacro.split(/[\s,")]/).reject { |s| s.empty? }
property.type = data[4]
end
property.type = data[4]
end
+ # last item should be property enum, e.g. INPUT_POINT_SIZE
property.enum = data[data.length-1]
end
property.enum = data[data.length-1]
end