// EQU expressions public Symbol(String name, Location loc, Expr expr) { this.name = name; this.loc = loc; this.scope = Scope.LOCAL; this.expr = expr; this.dependencyCount = expr.countSyms(); }
public void eval(Program program) throws AsmError { if (evaluated) return; if (expr != null) value = expr.eval(program); evaluated = true; }
public String exprToString() { if (scope == Scope.IMPORTED) return ""; return expr == null ? "label" : expr.toString(); }