switch recheck to using an on_completion_step
[scpubgit/DX.git] / lib / DX / Deparse.pm
index 541a5a5..5350b58 100644 (file)
@@ -81,7 +81,7 @@ sub _fmt_hypothesis {
   my ($self, $hyp, $meta) = @_;
   $self->_fmt_object([
     map [ $_ => $hyp->$_ ],
-      qw(actions outstanding_propositions resolved_propositions scope)
+      qw(actions resolved_propositions scope)
   ], $meta);
 }
 
@@ -112,7 +112,19 @@ sub _fmt_action_addvalue {
 
 sub _fmt_action_bindvalue {
   my ($self, $action, $meta) = @_;
-  $self->_fmt_action_generic(BindValue => $action, $meta);
+  my $path = join '.', map $self->_fmt($_, $meta), @{$action->target_path};
+  my $bound_path = join '.',
+                     map $self->_fmt($_, $meta),
+                       @{$action->new_value
+                                ->action_builder
+                                ->inner_action_builder
+                                ->target_path};
+  join ' ', BindValue => $path, $bound_path;
+}
+
+sub _fmt_action_addboundvalue {
+  my ($self, $action, $meta) = @_;
+  $self->_fmt_action_generic(AddBoundValue => $action, $meta);
 }
 
 sub _fmt_action_setboundvalue {
@@ -169,4 +181,12 @@ sub _fmt_searchstate {
   ], $meta);
 }
 
+sub _fmt_step_normal {
+  my ($self, $step, $meta) = @_;
+  $self->_fmt_object([
+    [ actions => $step->actions ],
+    [ alternative_step => $step->alternative_step ],
+  ], $meta);
+}
+
 1;