@Test public void shouldTransformConditional() { transform( "module scotch.test", "really? = if True then \"Yes\"", " else if Maybe then \"Maybe\"", " else \"Nope\"" ); shouldHaveValue("scotch.test.(really?)", conditional( unshuffled(literal(true)), unshuffled(literal("Yes")), unshuffled(conditional( unshuffled(id("Maybe", t(0))), unshuffled(literal("Maybe")), unshuffled(literal("Nope")), t(1) )), t(2) )); }
public DefinitionGraph transform(Map<String, List<ModuleContext>> moduleMap) { definition(null, RootDefinition.builder(), builder -> moduleMap.keySet().forEach( moduleName -> builder.withModule(transformModules(moduleName, moduleMap.get(moduleName))))); return createGraph(definitions).build(); }
SyntaxTransformer { public DefinitionGraph transform(Map<String, List<ModuleContext>> moduleMap) { definition(null, RootDefinition.builder(), builder -> moduleMap.keySet().forEach( moduleName -> builder.withModule(transformModules(moduleName, moduleMap.get(moduleName))))); return createGraph(definitions).build(); } }
SyntaxTransformer { public DefinitionGraph transform(Map<String, List<ModuleContext>> moduleMap) { definition(null, RootDefinition.builder(), builder -> moduleMap.keySet().forEach( moduleName -> builder.withModule(transformModules(moduleName, moduleMap.get(moduleName))))); return createGraph(definitions).build(); } SyntaxTransformer(SymbolResolver resolver, SymbolGenerator symbolGenerator); }
SyntaxTransformer { public DefinitionGraph transform(Map<String, List<ModuleContext>> moduleMap) { definition(null, RootDefinition.builder(), builder -> moduleMap.keySet().forEach( moduleName -> builder.withModule(transformModules(moduleName, moduleMap.get(moduleName))))); return createGraph(definitions).build(); } SyntaxTransformer(SymbolResolver resolver, SymbolGenerator symbolGenerator); DefinitionGraph transform(Map<String, List<ModuleContext>> moduleMap); }
SyntaxTransformer { public DefinitionGraph transform(Map<String, List<ModuleContext>> moduleMap) { definition(null, RootDefinition.builder(), builder -> moduleMap.keySet().forEach( moduleName -> builder.withModule(transformModules(moduleName, moduleMap.get(moduleName))))); return createGraph(definitions).build(); } SyntaxTransformer(SymbolResolver resolver, SymbolGenerator symbolGenerator); DefinitionGraph transform(Map<String, List<ModuleContext>> moduleMap);  }