Mercurial > hg > octave-nkf
annotate src/pt-cmd.cc @ 8924:3c3cbe8f18e0 ss-3-1-54
bump version info for snapshot
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 07 Mar 2009 13:28:03 -0500 |
parents | eb63fbe60fab |
children | cd96d29c5efa |
rev | line source |
---|---|
494 | 1 /* |
2 | |
8920 | 3 Copyright (C) 1994, 1995, 1996, 1997, 2002, 2004, 2005, 2006, 2007, |
4 2008, 2009 John W. Eaton | |
494 | 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. | |
494 | 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/>. | |
494 | 21 |
22 */ | |
23 | |
24 #ifdef HAVE_CONFIG_H | |
1192 | 25 #include <config.h> |
494 | 26 #endif |
27 | |
2956 | 28 #include "pt-cmd.h" |
2124 | 29 #include "pt-walk.h" |
916 | 30 |
2620 | 31 // No-op. |
32 | |
5861 | 33 tree_command * |
7767
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7755
diff
changeset
|
34 tree_no_op_command::dup (symbol_table::scope_id, |
8913
35cd375d4bb3
make tree::dup functions const
John W. Eaton <jwe@octave.org>
parents:
8658
diff
changeset
|
35 symbol_table::context_id) const |
5861 | 36 { |
37 return new tree_no_op_command (orig_cmd, line (), column ()); | |
38 } | |
39 | |
2620 | 40 void |
41 tree_no_op_command::accept (tree_walker& tw) | |
42 { | |
43 tw.visit_no_op_command (*this); | |
44 } | |
45 | |
7715
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
46 // Function definition. |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
47 |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
48 tree_command * |
7767
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7755
diff
changeset
|
49 tree_function_def::dup (symbol_table::scope_id, |
8913
35cd375d4bb3
make tree::dup functions const
John W. Eaton <jwe@octave.org>
parents:
8658
diff
changeset
|
50 symbol_table::context_id) const |
7715
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
51 { |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
52 return new tree_function_def (fcn, line (), column ()); |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
53 } |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
54 |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
55 void |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
56 tree_function_def::accept (tree_walker& tw) |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
57 { |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
58 tw.visit_function_def (*this); |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
59 } |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
60 |
494 | 61 /* |
62 ;;; Local Variables: *** | |
63 ;;; mode: C++ *** | |
64 ;;; End: *** | |
65 */ |