changeset 21542:7ba48ff6ce83

Record correct line number with "until" command (bug #43249) * pt-eval.cc (visit_do_until_command): set_location just before testing until condition.
author Lachlan Andrew <lachlanbis@gmail.com>
date Fri, 26 Feb 2016 09:52:43 +1100
parents 38c0c1f5cf57
children 4f0f9f029d12
files libinterp/parse-tree/pt-eval.cc
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.cc	Thu Mar 24 18:56:33 2016 +0100
+++ b/libinterp/parse-tree/pt-eval.cc	Fri Feb 26 09:52:43 2016 +1100
@@ -1067,6 +1067,8 @@
   in_loop_command = true;
 
   tree_expression *expr = cmd.condition ();
+  int until_line = cmd.line ();
+  int until_column = cmd.column ();
 
   if (! expr)
     panic_impossible ();
@@ -1084,6 +1086,8 @@
       if (debug_mode)
         do_breakpoint (cmd.is_breakpoint (true));
 
+      octave_call_stack::set_location (until_line, until_column);
+
       if (expr->is_logically_true ("do-until"))
         break;
     }