// Mike Maxim
// IRTree for statement expression

package edu.cmu.cs.l3.tree;

public class IRStatementExpression extends IRStatement {

    public IRStatementExpression(IRExpression e) {
	m_exp = e;

	m_classname = "IRStatementExpression";
    }

    public IRExpression getExpression() {
	return m_exp;
    }

    public void setExpression(IRExpression exp) {
	m_exp = exp;
    }

    public IRExpressionList getComponents() {
	return new IRExpressionList(m_exp);
    }

    public IRStatement build(IRExpressionList comps) {
	return new IRStatementExpression(comps.getExpression(0));
    }

    public String toString() {
	return ("[" + super.toString() + " " + m_exp.toString() + "]");
    }

    private IRExpression m_exp;
}

