Programming-Language-Design / src / ast / expression / AbstractExpression.java
AbstractExpression.java
Raw
package ast.expression;

import ast.AbstractASTNode;
import ast.type.Type;


public abstract class AbstractExpression extends AbstractASTNode implements Expression {
    boolean lvalue;
    Type type;

    public AbstractExpression(int line, int column) {
        super(line, column);
        this.lvalue = false;
        this.type = null;
    }

    @Override
    public boolean isLValue() {
        return lvalue;
    }

    @Override
    public void setLValue(boolean lvalue) {
        this.lvalue = lvalue;
    }

    @Override
    public Type getType() {
        return type;
    }

    @Override
    public void setType(Type type) {
        this.type = type;
    }
}