// Mike Maxim
// Absyn for for statements

package edu.cmu.cs.l3.absyn;

public class ASForStatement extends ASStatement {

    public ASForStatement(int p, ASStatement ass, ASExpression t, ASStatement i, ASStatement b) {
	super(p);
	m_ass = ass; m_endtest = t; m_increment = i; m_body=b;

	m_classname = "ASForStatement";
    }

    public ASStatement getAssignment() {
        return m_ass;
    }

    public ASExpression getEndTest() {
	return m_endtest;
    }

    public ASStatement getForWorkStatement() {
	return m_increment;
    }

    public ASStatement getBody() {
	return m_body;
    }

    public String toString() {
	return "FOR: ASS: " + m_ass.toString()+ "T:  " + m_endtest.toString() + "; " + m_increment.toString() + " body: " + m_body.toString();
    }

    private ASStatement m_ass;
    private ASExpression m_endtest;
    private ASStatement m_increment,m_body;
}
