Пример #1
0
 /**
  * Search the current environment frame for the variable If the variable is not found, recursively
  * search the calling frames.
  *
  * @param var the variable to lookup in the environment
  * @return the variable
  */
 public String getVariable(String var) {
   String v = null;
   v = (String) variables.get(var);
   if (v == null) {
     if (this.parent == null) return null;
     else return parent.getVariable(var);
   } else {
     return v;
   }
 }