summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2020-09-07 00:02:29 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2020-09-07 00:02:29 +0200
commit07c0f271e1f30fdc87da9ef122781c83ff410f64 (patch)
treed2d256f432e0609b2c768f6c90e832e23942e909 /src/json-export
parent55b0873d35189e6e6f1f36670b9687bfc227da25 (diff)
Adds 'Initialize' Wyrd instruction.
The 'SetValue' Wyrd instruction is no longer allowed to write to a non-existing memory element.
Diffstat (limited to 'src/json-export')
-rw-r--r--src/json-export/src/tonkadur/jsonexport/InstructionCompiler.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/json-export/src/tonkadur/jsonexport/InstructionCompiler.java b/src/json-export/src/tonkadur/jsonexport/InstructionCompiler.java
index 01b8e76..22c2fca 100644
--- a/src/json-export/src/tonkadur/jsonexport/InstructionCompiler.java
+++ b/src/json-export/src/tonkadur/jsonexport/InstructionCompiler.java
@@ -149,6 +149,22 @@ public class InstructionCompiler implements InstructionVisitor
result.put("value", val_cc.get_result());
}
+ public void visit_initialize (final Initialize n)
+ throws Throwable
+ {
+ final ComputationCompiler ref_cc;
+
+ ref_cc = new ComputationCompiler();
+
+ n.get_address().get_visited_by(ref_cc);
+
+ result = new JSONObject();
+
+ result.put("category", "initialize");
+ result.put("reference", ref_cc.get_result());
+ result.put("type", Translator.compile_type(n.get_type()));
+ }
+
public void visit_prompt_integer (final PromptInteger n)
throws Throwable
{