Mercurial > hg > octave-nkf
annotate src/pt-jump.cc @ 9636:74be4b7273e4 ss-3-3-50
update version info for snapshot
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 12 Sep 2009 06:55:13 -0400 |
parents | eb63fbe60fab |
children | cd96d29c5efa |
rev | line source |
---|---|
2982 | 1 /* |
2 | |
8920 | 3 Copyright (C) 1996, 1997, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 |
7017 | 4 John W. Eaton |
2982 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
2982 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
2982 | 21 |
22 */ | |
23 | |
24 #ifdef HAVE_CONFIG_H | |
25 #include <config.h> | |
26 #endif | |
27 | |
28 #include "error.h" | |
3770 | 29 #include "oct-obj.h" |
30 #include "pt-bp.h" | |
2982 | 31 #include "pt-jump.h" |
32 #include "pt-walk.h" | |
33 | |
3770 | 34 class octave_value_list; |
35 | |
2982 | 36 // Break. |
37 | |
2985 | 38 // Nonzero means we're breaking out of a loop or function body. |
4207 | 39 int tree_break_command::breaking = 0; |
2985 | 40 |
5861 | 41 tree_command * |
7767
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
42 tree_break_command::dup (symbol_table::scope_id, |
8913
35cd375d4bb3
make tree::dup functions const
John W. Eaton <jwe@octave.org>
parents:
8658
diff
changeset
|
43 symbol_table::context_id) const |
5861 | 44 { |
45 return new tree_break_command (line (), column ()); | |
46 } | |
47 | |
2982 | 48 void |
4207 | 49 tree_break_command::accept (tree_walker& tw) |
2982 | 50 { |
4207 | 51 tw.visit_break_command (*this); |
2982 | 52 } |
53 | |
54 // Continue. | |
55 | |
2985 | 56 // Nonzero means we're jumping to the end of a loop. |
4207 | 57 int tree_continue_command::continuing = 0; |
2985 | 58 |
5861 | 59 tree_command * |
7767
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
60 tree_continue_command::dup (symbol_table::scope_id, |
8913
35cd375d4bb3
make tree::dup functions const
John W. Eaton <jwe@octave.org>
parents:
8658
diff
changeset
|
61 symbol_table::context_id) const |
5861 | 62 { |
63 return new tree_continue_command (line (), column ()); | |
64 } | |
65 | |
2982 | 66 void |
4207 | 67 tree_continue_command::accept (tree_walker& tw) |
2982 | 68 { |
4207 | 69 tw.visit_continue_command (*this); |
2982 | 70 } |
71 | |
72 // Return. | |
73 | |
5501 | 74 // Nonzero means we're returning from a function. |
4207 | 75 int tree_return_command::returning = 0; |
2985 | 76 |
5861 | 77 tree_command * |
7767
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
78 tree_return_command::dup (symbol_table::scope_id, |
8913
35cd375d4bb3
make tree::dup functions const
John W. Eaton <jwe@octave.org>
parents:
8658
diff
changeset
|
79 symbol_table::context_id) const |
5861 | 80 { |
81 return new tree_return_command (line (), column ()); | |
82 } | |
83 | |
2982 | 84 void |
4207 | 85 tree_return_command::accept (tree_walker& tw) |
2982 | 86 { |
4207 | 87 tw.visit_return_command (*this); |
2982 | 88 } |
89 | |
90 /* | |
91 ;;; Local Variables: *** | |
92 ;;; mode: C++ *** | |
93 ;;; End: *** | |
94 */ |