[ClavaWeaver] Adds CxxWeaver.getWeaverDefinition()
@@ -28,6 +28,8 @@ import org.lara.interpreter.weaver.options.WeaverOptionBuilder;
import org.lara.language.specification.LanguageSpecification;
import org.suikasoft.jOptions.Datakey.DataKey;
import org.suikasoft.jOptions.Interfaces.DataStore;
+import org.suikasoft.jOptions.storedefinition.StoreDefinition;
+import org.suikasoft.jOptions.storedefinition.StoreDefinitionBuilder;
import com.google.common.base.Preconditions;
@@ -59,6 +61,7 @@ import pt.up.fe.specs.util.SpecsSystem;
import pt.up.fe.specs.util.collections.AccumulatorMap;
import pt.up.fe.specs.util.csv.CsvField;
import pt.up.fe.specs.util.csv.CsvWriter;
+import pt.up.fe.specs.util.lazy.Lazy;
import pt.up.fe.specs.util.parsing.arguments.ArgumentsParser;
import pt.up.fe.specs.util.providers.ResourceProvider;
import pt.up.fe.specs.util.utilities.LineStream;
@@ -173,6 +176,20 @@ public class CxxWeaver extends ACxxWeaver {
}
+ /**
+ * All definitions, including default LaraI keys and Clava-specific keys.
+ */
+ private static final Lazy<StoreDefinition> WEAVER_DEFINITION = Lazy.newInstance(() -> {
+ return new StoreDefinitionBuilder("Clava Weaver")
+ .addDefinition(LaraiKeys.STORE_DEFINITION)
+ .addDefinition(CxxWeaverOption.STORE_DEFINITION)
+ .build();
+ });
+
+ public static StoreDefinition getWeaverDefinition() {
+ return WEAVER_DEFINITION.get();
+ }
+
// Weaver configuration
private DataStore args = null;
