package ast.definition.classes; import ast.definition.AbstractDefinition; import ast.statement.Statement; import ast.type.Type; import visitor.Visitor; public class VarDefinition extends AbstractDefinition implements Statement { private int offset; public VarDefinition(int line, int column, String name, Type type) { super(line, column, name, type); } public int getOffset() { return offset; } public void setOffset(int offset) { this.offset = offset; } @Override public String getName() { return super.getName(); } @Override public Type getType() { return super.getType(); } @Override public String toString() { return getType() + " " + getName(); } @Override public <TP, TR> TR accept(Visitor<TP, TR> v, TP param) { return v.visit(this, param); } }