Пример #1
0
 // 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();
 }
Пример #2
0
 public void eval(Program program) throws AsmError {
   if (evaluated) return;
   if (expr != null) value = expr.eval(program);
   evaluated = true;
 }
Пример #3
0
 public String exprToString() {
   if (scope == Scope.IMPORTED) return "";
   return expr == null ? "label" : expr.toString();
 }