Package wyvern.tools.types

Examples of wyvern.tools.types.Environment.lookup()


    final Environment savedNtEnv2 = ntEnv;
    res.getGrammars().stream().map(res::getGrammar)
        .flatMap(grm->grm.getElementsOfType(CopperElementType.PRODUCTION).stream().map(grm::getGrammarElement).<Production>map(el->(Production)el))
        .<Pair<Production, List<NameBinding>>>map(prod->new Pair<Production, List<NameBinding>>(prod, CopperTSL.<Type,String,Optional<NameBinding>>
            zip(prod.getRhs().stream().map(cer->savedNtEnv2.lookup(cer.getName().toString()).getType()), prod.getRhsVarNames().stream(),
            (type, name) -> (name == null)?Optional.empty():Optional.of(new NameBindingImpl(name, type)))
            .<NameBinding>flatMap(o -> o.isPresent() ? Stream.of(o.get()) : Stream.empty())
            .collect(Collectors.<NameBinding>toList()))
        ).forEach(updateCode(toGen,ntEnv,methNum, res.getClassName()));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.