فهرست منبع

CCode Generator: variable initial value can be of type Expression

Andreas Mülder 14 سال پیش
والد
کامیت
0aaa0123d3

+ 1 - 1
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/Interfaces.xpt

@@ -108,7 +108,7 @@ void 
 «FOREACH interface.declarations.typeSelect(VariableDefinition) AS variable -»
 «IF variable.initialValue != null»
 «REM»change to correctLValue«ENDREM»
-	handle->«variable.name» = «variable.initialValue.correctLValue()»;
+	handle->«variable.name» = «variable.initialValue.toCCode()»;
 «ENDIF»
 «ENDFOREACH»
 

+ 2 - 1
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/Naming.ext

@@ -55,8 +55,9 @@ String interfaceObjectName(InterfaceScope this) : "interface" + ((this.name == n
 
 String getEventEnumName(EventDefinition this) : "ev_" + this.name;
 
+/**
 String correctLValue(String literal) :
     (literal == "true" ? "bool_true" :
 	(literal == "false" ? "bool_false" :
 	literal ));
-    
+**/