Mercurial > hg > octave-nkf
annotate src/pt-jump.h @ 7767:71f068b22fcc
scope and context fixes for function handles
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 07 May 2008 13:45:30 -0400 |
parents | 745a8299c2b5 |
children | 73c4516fae10 |
rev | line source |
---|---|
2982 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1996, 1997, 2002, 2004, 2005, 2006, 2007 John W. Eaton |
2982 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
2982 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
2982 | 20 |
21 */ | |
22 | |
23 #if !defined (octave_tree_jump_h) | |
24 #define octave_tree_jump_h 1 | |
25 | |
26 class tree_walker; | |
27 | |
4207 | 28 #include "pt-cmd.h" |
7336 | 29 #include "symtab.h" |
2982 | 30 |
31 // Break. | |
32 | |
33 class | |
4207 | 34 tree_break_command : public tree_command |
2982 | 35 { |
36 public: | |
37 | |
4207 | 38 tree_break_command (int l = -1, int c = -1) |
39 : tree_command (l, c) { } | |
2982 | 40 |
4207 | 41 ~tree_break_command (void) { } |
2982 | 42 |
4207 | 43 void eval (void); |
2982 | 44 |
7767
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
45 tree_command *dup (symbol_table::scope_id scope, |
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
46 symbol_table::context_id context); |
5861 | 47 |
2982 | 48 void accept (tree_walker& tw); |
2985 | 49 |
50 static int breaking; | |
2988 | 51 |
52 private: | |
53 | |
54 // No copying! | |
55 | |
4207 | 56 tree_break_command (const tree_break_command&); |
2988 | 57 |
4207 | 58 tree_break_command& operator = (const tree_break_command&); |
2982 | 59 }; |
60 | |
61 // Continue. | |
62 | |
63 class | |
4207 | 64 tree_continue_command : public tree_command |
2982 | 65 { |
66 public: | |
67 | |
4207 | 68 tree_continue_command (int l = -1, int c = -1) |
69 : tree_command (l, c) { } | |
2982 | 70 |
4207 | 71 ~tree_continue_command (void) { } |
2982 | 72 |
4207 | 73 void eval (void); |
2982 | 74 |
7767
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
75 tree_command *dup (symbol_table::scope_id scope, |
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
76 symbol_table::context_id context); |
5861 | 77 |
2982 | 78 void accept (tree_walker& tw); |
2985 | 79 |
80 static int continuing; | |
2988 | 81 |
82 private: | |
83 | |
84 // No copying! | |
85 | |
4207 | 86 tree_continue_command (const tree_continue_command&); |
2988 | 87 |
4207 | 88 tree_continue_command& operator = (const tree_continue_command&); |
2982 | 89 }; |
90 | |
91 // Return. | |
92 | |
93 class | |
4207 | 94 tree_return_command : public tree_command |
2982 | 95 { |
96 public: | |
97 | |
4207 | 98 tree_return_command (int l = -1, int c = -1) |
99 : tree_command (l, c) { } | |
2982 | 100 |
4207 | 101 ~tree_return_command (void) { } |
2982 | 102 |
4207 | 103 void eval (void); |
2982 | 104 |
7767
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
105 tree_command *dup (symbol_table::scope_id scope, |
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
106 symbol_table::context_id context); |
5861 | 107 |
2982 | 108 void accept (tree_walker& tw); |
2985 | 109 |
110 static int returning; | |
2988 | 111 |
112 private: | |
113 | |
114 // No copying! | |
115 | |
4207 | 116 tree_return_command (const tree_return_command&); |
2988 | 117 |
4207 | 118 tree_return_command& operator = (const tree_return_command&); |
2982 | 119 }; |
120 | |
121 #endif | |
122 | |
123 /* | |
124 ;;; Local Variables: *** | |
125 ;;; mode: C++ *** | |
126 ;;; End: *** | |
127 */ |