annotate src/pt-jump.cc @ 10315:57a59eae83cc

untabify src C++ source files
author John W. Eaton <jwe@octave.org>
date Thu, 11 Feb 2010 12:41:46 -0500
parents cd96d29c5efa
children fd0a3ac60b0e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
1 /*
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
2
8920
eb63fbe60fab update copyright notices
John W. Eaton <jwe@octave.org>
parents: 8913
diff changeset
3 Copyright (C) 1996, 1997, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
4 John W. Eaton
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
5
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
6 This file is part of Octave.
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
7
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
8 Octave is free software; you can redistribute it and/or modify it
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5861
diff changeset
10 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5861
diff changeset
11 option) any later version.
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
12
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
13 Octave is distributed in the hope that it will be useful, but WITHOUT
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
16 for more details.
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
17
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5861
diff changeset
19 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5861
diff changeset
20 <http://www.gnu.org/licenses/>.
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
21
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
22 */
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
23
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
24 #ifdef HAVE_CONFIG_H
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
25 #include <config.h>
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
26 #endif
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
27
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
28 #include "error.h"
3770
bf6116ca10eb [project @ 2001-02-02 02:21:40 by jwe]
jwe
parents: 2985
diff changeset
29 #include "oct-obj.h"
bf6116ca10eb [project @ 2001-02-02 02:21:40 by jwe]
jwe
parents: 2985
diff changeset
30 #include "pt-bp.h"
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
31 #include "pt-jump.h"
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
32 #include "pt-walk.h"
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
33
3770
bf6116ca10eb [project @ 2001-02-02 02:21:40 by jwe]
jwe
parents: 2985
diff changeset
34 class octave_value_list;
bf6116ca10eb [project @ 2001-02-02 02:21:40 by jwe]
jwe
parents: 2985
diff changeset
35
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
36 // Break.
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
37
2985
aa9d0c0e0458 [project @ 1997-05-16 06:54:18 by jwe]
jwe
parents: 2982
diff changeset
38 // Nonzero means we're breaking out of a loop or function body.
4207
fa3482b34599 [project @ 2002-12-03 18:22:05 by jwe]
jwe
parents: 4192
diff changeset
39 int tree_break_command::breaking = 0;
2985
aa9d0c0e0458 [project @ 1997-05-16 06:54:18 by jwe]
jwe
parents: 2982
diff changeset
40
5861
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
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,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
43 symbol_table::context_id) const
5861
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
44 {
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
45 return new tree_break_command (line (), column ());
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
46 }
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
47
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
48 void
4207
fa3482b34599 [project @ 2002-12-03 18:22:05 by jwe]
jwe
parents: 4192
diff changeset
49 tree_break_command::accept (tree_walker& tw)
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
50 {
4207
fa3482b34599 [project @ 2002-12-03 18:22:05 by jwe]
jwe
parents: 4192
diff changeset
51 tw.visit_break_command (*this);
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
52 }
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
53
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
54 // Continue.
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
55
2985
aa9d0c0e0458 [project @ 1997-05-16 06:54:18 by jwe]
jwe
parents: 2982
diff changeset
56 // Nonzero means we're jumping to the end of a loop.
4207
fa3482b34599 [project @ 2002-12-03 18:22:05 by jwe]
jwe
parents: 4192
diff changeset
57 int tree_continue_command::continuing = 0;
2985
aa9d0c0e0458 [project @ 1997-05-16 06:54:18 by jwe]
jwe
parents: 2982
diff changeset
58
5861
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
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,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
61 symbol_table::context_id) const
5861
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
62 {
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
63 return new tree_continue_command (line (), column ());
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
64 }
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
65
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
66 void
4207
fa3482b34599 [project @ 2002-12-03 18:22:05 by jwe]
jwe
parents: 4192
diff changeset
67 tree_continue_command::accept (tree_walker& tw)
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
68 {
4207
fa3482b34599 [project @ 2002-12-03 18:22:05 by jwe]
jwe
parents: 4192
diff changeset
69 tw.visit_continue_command (*this);
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
70 }
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
71
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
72 // Return.
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
73
5501
f2b9aa13f2bf [project @ 2005-10-18 19:25:14 by jwe]
jwe
parents: 5307
diff changeset
74 // Nonzero means we're returning from a function.
4207
fa3482b34599 [project @ 2002-12-03 18:22:05 by jwe]
jwe
parents: 4192
diff changeset
75 int tree_return_command::returning = 0;
2985
aa9d0c0e0458 [project @ 1997-05-16 06:54:18 by jwe]
jwe
parents: 2982
diff changeset
76
5861
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
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,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
79 symbol_table::context_id) const
5861
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
80 {
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
81 return new tree_return_command (line (), column ());
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
82 }
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5501
diff changeset
83
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
84 void
4207
fa3482b34599 [project @ 2002-12-03 18:22:05 by jwe]
jwe
parents: 4192
diff changeset
85 tree_return_command::accept (tree_walker& tw)
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
86 {
4207
fa3482b34599 [project @ 2002-12-03 18:22:05 by jwe]
jwe
parents: 4192
diff changeset
87 tw.visit_return_command (*this);
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
88 }