Fixed InvertBasicExpressionVisitor bugs with subtractions and divisions
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / expression / InvertBasicExpressionVisitor.java
1 package org.simantics.modeling.ui.expression;
2
3 import org.simantics.basicexpression.node.AStringValue;
4 import org.simantics.modeling.InvertBasicExpressionVisitorBase;
5 import org.simantics.utils.datastructures.Triple;
6
7 public class InvertBasicExpressionVisitor extends InvertBasicExpressionVisitorBase {
8
9         @Override
10         public void outAStringValue(AStringValue node) {
11                 String value = node.toString();
12                 stack.push(Triple.make(1.0, 0.0, value.substring(1, value.length() - 2).trim()));
13         }
14
15 }