Commit a1bd3b70 authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Add some toString methods to help debugging.

Add some toString methods to aid debugging the operations setup.  It isn't
committed centrally as I'm not sure it is a good idea.

git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10843 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent 32c57bec
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -75,6 +75,11 @@ final class MatlabExpressionBinaryOperation implements MatlabExpression, MatlabE
        m_rhs = subExpression;
    }

    @Override
    public String toString() {
        return "(" + m_lhs.toString() + " " + m_op.toString() + " " + m_rhs.toString() + ")";
    }

    MatlabExpression m_lhs, m_rhs;
    MatlabBinaryOperation m_op;
}
+5 −0
Original line number Diff line number Diff line
@@ -45,6 +45,11 @@ final class MatlabExpressionUnaryOperation implements MatlabExpression, MatlabEx
        m_expr = subExpression;
    }

    @Override
    public String toString() {
        return "( " + m_op + " " + m_expr + ")";
    }

    MatlabExpression m_expr;
    MatlabUnaryOperation m_op;
}
+5 −0
Original line number Diff line number Diff line
@@ -32,5 +32,10 @@ public final class MatlabLiteral implements MatlabExpression, MatlabExpressionVa
        return generator.GenerateLiterlaValue(m_value, requestedType);
    }

    @Override
    public String toString() {
        return m_value;
    }

    final String m_value;
}
+5 −0
Original line number Diff line number Diff line
@@ -40,4 +40,9 @@ public class Variable implements MatlabExpression, MatlabExpressionValue {
        }
        return m_name;
    }

    @Override
    public String toString() {
        return m_name;
    }
}