예제 #1
0
 public HashMap<String, WFunctionSymbol> getfunctions() {
   HashMap<String, WFunctionSymbol> functions = new HashMap<>();
   for (Symbol s : GLOBALS.getAllSymbols()) {
     if (s instanceof WFunctionSymbol) {
       functions.put(s.getName(), (WFunctionSymbol) s);
     }
   }
   return functions;
 }
예제 #2
0
 public int computerFuncIndex(String name) {
   int i = -1;
   for (Symbol v : GLOBALS.getSymbols()) {
     if (v instanceof WFunctionSymbol) {
       i++;
       if (v.getName().equals(name)) {
         return i;
       }
     }
   }
   return i;
 }