public void addVariable(Var var) {
    if (currentPackageDecl != null) {
      currentPackageDecl.addVariable(var);
    }
    else if (exec.currentScope != null) {
      exec.currentScope.addVariable(var);
    }
  }
Add a local variable to the current scope
hplsql/src/main/java/org/apache/hive/hplsql/Exec.java