Package wyvern.tools.typedAST.core.declarations

Examples of wyvern.tools.typedAST.core.declarations.ValDeclaration



    AtomicInteger cdIdx = new AtomicInteger();
    TypedAST[] classDecls = new TypedAST[toGen.size() + toGenDefs.size() + 1];
    toGen.entrySet().stream().forEach(entry->classDecls[cdIdx.getAndIncrement()]
        = new ValDeclaration(entry.getKey(), DefDeclaration.getMethodType(entry.getValue().second().getArgBindings(), entry.getValue().first()), entry.getValue().second(), unkLoc));

    toGenDefs.entrySet().stream().forEach(entry->classDecls[cdIdx.getAndIncrement()]
        = new DefDeclaration(entry.getKey(), new Arrow(Unit.getInstance(), Unit.getInstance()), new LinkedList<>(), entry.getValue(), false));

    classDecls[cdIdx.getAndIncrement()] = new DefDeclaration("create", new Arrow(Unit.getInstance(),
View Full Code Here


    }
  }

  private Environment getGenericDecls(Environment env, Environment mockEnv, LinkedList<Declaration> decls) {
    for (Entry<String, TypedAST> elem : args.entrySet()) {
      ValDeclaration e = new ValDeclaration(elem.getKey(), elem.getValue(), elem.getValue().getLocation());
      e.typecheck(env, Optional.empty());
      mockEnv = e.extend(mockEnv, mockEnv);
      decls.add(e);
    }
    return mockEnv;
  }
View Full Code Here

TOP

Related Classes of wyvern.tools.typedAST.core.declarations.ValDeclaration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.