X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Fcompilation%2FSCLCompiler.java;fp=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Fcompilation%2FSCLCompiler.java;h=cd43b76e15dec63e81b6ca704238ee2f956aec4c;hp=643513d67720537450e8c98fbd411bdd781b000e;hb=78f577368ba4c71ad6fb3d9f16c03c634585cf7b;hpb=a88529426319d66aa668882d767efb3f58a1a629 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/compilation/SCLCompiler.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/compilation/SCLCompiler.java index 643513d67..cd43b76e1 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/compilation/SCLCompiler.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/compilation/SCLCompiler.java @@ -44,6 +44,7 @@ public class SCLCompiler { try { SCLParserImpl parser = new SCLParserImpl(sourceReader); parser.setParserOptions(SCLParserOptions.MODULE_DEFAULT); + parser.setCompilationContext(compilationContext); if(!parser.isEmpty()) for(DeclarationAst declaration : (ArrayList)parser.parseModule()) declarations.handle(declaration); @@ -70,7 +71,6 @@ public class SCLCompiler { String moduleName) { try { if(hasErrors()) return; - compilationContext.header = ModuleHeader.process(compilationContext.errorLog, declarations.moduleHeader); Elaboration elaboration = new Elaboration(compilationContext, timer, localEnvironmentFactory, @@ -87,7 +87,8 @@ public class SCLCompiler { elaboration.addTypesToEnvironment( declarations.dataTypesAst, declarations.typeAliasesAst, - declarations.effectsAst); + declarations.effectsAst, + declarations.rulesetsAst); if(hasErrors()) return; elaboration.processTypeAliases(declarations.typeAliasesAst); if(hasErrors()) return; @@ -101,6 +102,8 @@ public class SCLCompiler { if(hasErrors()) return; elaboration.processJavaMethods(declarations.javaMethodDeclarations); if(hasErrors()) return; + elaboration.processRulesets(declarations.rulesetsAst); + if(hasErrors()) return; elaboration.addDataTypesToEnvironment(); elaboration.addTypeClassesToEnvironment(); elaboration.preprocessValueDefinitions(declarations.typeAnnotationsAst);