| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2020-08-05 22:11:19 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2020-08-05 22:11:19 +0200 |
| commit | 5ba737fbc8edac0eb5ed750d92a5b3158fb2a32e (patch) | |
| tree | 554db4b2b8f48d9d916f1347040702afe3dea417 /src/core | |
| parent | 3117e912b50658e930397c1fabe3982df50e1ac2 (diff) | |
Adds JSON export.
Diffstat (limited to 'src/core')
4 files changed, 47 insertions, 22 deletions
diff --git a/src/core/src/tonkadur/wyrd/v1/lang/World.java b/src/core/src/tonkadur/wyrd/v1/lang/World.java index 39e6485..3649756 100644 --- a/src/core/src/tonkadur/wyrd/v1/lang/World.java +++ b/src/core/src/tonkadur/wyrd/v1/lang/World.java @@ -43,11 +43,21 @@ public class World required_extensions.add(name); } + public Set<String> get_required_extensions () + { + return required_extensions; + } + public DictType get_dict_type (final String name) { return dict_types.get(name); } + public List<DictType> get_ordered_dict_types () + { + return dict_types_in_order; + } + public void add_dict_type (final DictType dict_type) { dict_types.put(dict_type.get_name(), dict_type); @@ -59,6 +69,11 @@ public class World return variables.get(name); } + public Map<String, Variable> get_variables () + { + return variables; + } + public void add_variable (final Variable variable) { variables.put(variable.get_name(), variable); @@ -69,6 +84,11 @@ public class World sequence_labels.put(name, line); } + public Map<String, Integer> get_sequence_labels () + { + return sequence_labels; + } + public void add_instruction (final Instruction i) { code.add(i); diff --git a/src/core/src/tonkadur/wyrd/v1/lang/computation/Operation.java b/src/core/src/tonkadur/wyrd/v1/lang/computation/Operation.java index 6806936..365bd07 100644 --- a/src/core/src/tonkadur/wyrd/v1/lang/computation/Operation.java +++ b/src/core/src/tonkadur/wyrd/v1/lang/computation/Operation.java @@ -199,7 +199,12 @@ public class Operation extends Computation return param_a; } - public Computation get_secomd_parameter () + public String get_operator () + { + return operator; + } + + public Computation get_second_parameter () { return param_b; } diff --git a/src/core/src/tonkadur/wyrd/v1/lang/meta/ComputationVisitor.java b/src/core/src/tonkadur/wyrd/v1/lang/meta/ComputationVisitor.java index a0e1dc1..e0944a4 100644 --- a/src/core/src/tonkadur/wyrd/v1/lang/meta/ComputationVisitor.java +++ b/src/core/src/tonkadur/wyrd/v1/lang/meta/ComputationVisitor.java @@ -5,38 +5,38 @@ import tonkadur.wyrd.v1.lang.computation.*; public interface ComputationVisitor { public void visit_add_rich_text_effect (final AddRichTextEffect n) - throws Exception; + throws Throwable; public void visit_cast (final Cast n) - throws Exception; + throws Throwable; public void visit_constant (final Constant n) - throws Exception; + throws Throwable; public void visit_if_else_computation (final IfElseComputation n) - throws Exception; + throws Throwable; public void visit_new (final New n) - throws Exception; + throws Throwable; public void visit_newline (final Newline n) - throws Exception; + throws Throwable; public void visit_operation (final Operation n) - throws Exception; + throws Throwable; public void visit_ref (final Ref n) - throws Exception; + throws Throwable; public void visit_relative_ref (final RelativeRef n) - throws Exception; + throws Throwable; public void visit_rich_text (final RichText n) - throws Exception; + throws Throwable; public void visit_size (final Size n) - throws Exception; + throws Throwable; public void visit_value_of (final ValueOf n) - throws Exception; + throws Throwable; } diff --git a/src/core/src/tonkadur/wyrd/v1/lang/meta/InstructionVisitor.java b/src/core/src/tonkadur/wyrd/v1/lang/meta/InstructionVisitor.java index cf28ae8..8db6db0 100644 --- a/src/core/src/tonkadur/wyrd/v1/lang/meta/InstructionVisitor.java +++ b/src/core/src/tonkadur/wyrd/v1/lang/meta/InstructionVisitor.java @@ -5,29 +5,29 @@ import tonkadur.wyrd.v1.lang.instruction.*; public interface InstructionVisitor { public void visit_add_choice (final AddChoice n) - throws Exception; + throws Throwable; public void visit_assert (final Assert n) - throws Exception; + throws Throwable; public void visit_display (final Display n) - throws Exception; + throws Throwable; public void visit_end (final End n) - throws Exception; + throws Throwable; public void visit_event_call (final EventCall n) - throws Exception; + throws Throwable; public void visit_remove (final Remove n) - throws Exception; + throws Throwable; public void visit_resolve_choices (final ResolveChoices n) - throws Exception; + throws Throwable; public void visit_set_pc (final SetPC n) - throws Exception; + throws Throwable; public void visit_set_value (final SetValue n) - throws Exception; + throws Throwable; } |


