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%2Finternal%2Fheader%2FModuleHeader.java;fp=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Finternal%2Fheader%2FModuleHeader.java;h=7362b38ee1c81db4da85d7261640b273800e27fb;hp=0ab17f83478313ee3f5df5209850ce3178b198ef;hb=3ccd513530bc718ef384780d3151ddbb85600986;hpb=c7adae2a1ad46c9f316093213df0320b44461606 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/header/ModuleHeader.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/header/ModuleHeader.java index 0ab17f834..7362b38ee 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/header/ModuleHeader.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/header/ModuleHeader.java @@ -8,6 +8,7 @@ import org.simantics.scl.compiler.elaboration.expressions.records.FieldAssignmen import org.simantics.scl.compiler.errors.ErrorLog; public class ModuleHeader { + public String deprecated; public String classLoader; public long classLoaderLocation; public String defaultLocalName; @@ -16,6 +17,7 @@ public class ModuleHeader { // Features public boolean chr; public boolean fields; + public boolean edo; private void read(ErrorLog errorLog, FieldAssignment[] fields) { for(FieldAssignment assignment : fields) @@ -60,6 +62,15 @@ public class ModuleHeader { errorLog.log(assignment.value.location, "Expected string here."); } break; + case "deprecated": + if(assignment.value == null) + deprecated = ""; + else { + deprecated = AnnotationUtils.extractString(assignment.value); + if(deprecated == null) + errorLog.log(assignment.value.location, "Expected string here."); + } + break; default: errorLog.logWarning(assignment.location, "Unknown module header field was skipped."); } @@ -69,6 +80,7 @@ public class ModuleHeader { switch(feature.name) { case "chr": chr = true; break; case "fields": fields = true; break; + case "edo": edo = true; break; default: errorLog.log(feature.location, "Unknown feature " + feature.name + "."); }