]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/header/ModuleHeader.java
(refs #7508) Edo and modified mdo under edo feature
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / header / ModuleHeader.java
index 0ab17f83478313ee3f5df5209850ce3178b198ef..7362b38ee1c81db4da85d7261640b273800e27fb 100644 (file)
@@ -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 + ".");
         }