package edu.cmu.cs.l3.absyn;

public class ASPointerExpression extends ASExpression {

    public ASPointerExpression(int p, int op, ASExpression operand) {
	super(p); m_op = op; m_operand = operand;

	m_classname = "ASPointerExpression";
    }

    public ASPointerExpression(int p, ASType type, ASExpression number, ASExpression init) {
	super(p); m_op = ASPointerExpression.ALLOC; m_type = type;
	m_number = number; m_init = init;

	m_classname = "ASPointerExpression";
    }

    public static final int AMP=0,OFFSET=1,SIZE=2,ALLOC=3, INC=4, DEC=5;

    public int getOperation() {
	return m_op;
    }

    public ASType getType() {
	return m_type;
    }

    public ASExpression getOperand() {
	return m_operand;
    }

    public ASExpression getInit() {
	return m_init;
    }

    public void setInit(ASExpression e) {
        m_init = e;
    }

    public ASExpression getNumber() {
	return m_number;
    }

    private int m_op;
    private ASType m_type;
    private ASExpression m_operand,m_init,m_number;
}