コード例 #1
0
ファイル: TypeChecker.java プロジェクト: wrmsr/jaskell
 private void popContext() {
   if (nameStack.size() > 0) namesMap = (LinkedHashMap) nameStack.pop();
   if (typeStack.size() > 0) typeVariablesMap = (HashMap) typeStack.pop();
 }
コード例 #2
0
ファイル: TypeChecker.java プロジェクト: wrmsr/jaskell
 /**
  * Save a stack of names and type vars maps. Given argument is list of bindings from which we
  * construct a linked map to store names
  *
  * @param linkedHashMap
  */
 private void pushContext(Map bindings) {
   nameStack.push(namesMap);
   typeStack.push(typeVariablesMap);
   namesMap = new LinkedHashMap(bindings);
   typeVariablesMap = new HashMap();
 }