Commit 2500d534 authored by Ahmed's avatar Ahmed

fix some bugs

parent e58e0a20
......@@ -80,8 +80,11 @@ public class ComponentConverter {
MathExpressionProperties properties = new MathExpressionProperties();
MathConverter.setPropertiesForMathExpression(mathExpressionSymbols, mathExpressionSymbol, bluePrint, properties);
if(mathExpressionSymbol.isAssignmentExpression()){
MathMatrixNameExpressionSymbol mathMatrixNameExpressionSymbol = (MathMatrixNameExpressionSymbol) ((MathAssignmentExpressionSymbol)mathExpressionSymbol).getExpressionSymbol();
ComponentConverter.tuples.put(mathMatrixNameExpressionSymbol, properties);
MathExpressionSymbol mathExpressionSymbolTemp = ((MathAssignmentExpressionSymbol)mathExpressionSymbol).getExpressionSymbol();
if(mathExpressionSymbolTemp.isMatrixExpression()) {
MathMatrixNameExpressionSymbol mathMatrixNameExpressionSymbol = (MathMatrixNameExpressionSymbol) ((MathAssignmentExpressionSymbol) mathExpressionSymbol).getExpressionSymbol();
ComponentConverter.tuples.put(mathMatrixNameExpressionSymbol, properties);
}
} else{
ComponentConverter.tuples.put(mathExpressionSymbol, properties);
}
......@@ -411,7 +414,7 @@ public class ComponentConverter {
public static void redefineVariables(List<MathExpressionSymbol> mathExpressionSymbols, BluePrintCPP bluePrintCPP){
for(MathExpressionSymbol mathExpressionSymbol : mathExpressionSymbols){
if(mathExpressionSymbol.isAssignmentExpression()) {
if(mathExpressionSymbol.isAssignmentExpression() && ((MathAssignmentExpressionSymbol)mathExpressionSymbol).getExpressionSymbol().isMatrixExpression()) {
MathMatrixNameExpressionSymbol mathMatrixNameExpressionSymbol = (MathMatrixNameExpressionSymbol) ((MathAssignmentExpressionSymbol) mathExpressionSymbol).getExpressionSymbol();
String nameOfFirstParameter = mathMatrixNameExpressionSymbol.getMathMatrixAccessOperatorSymbol().getMathMatrixAccessSymbols().get(0).getTextualRepresentation();
String nameOfOutput = getNameOfOutput(mathExpressionSymbol);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment