00001 /* 00002 00003 Copyright (C) 1994-2012 John W. Eaton 00004 00005 This file is part of Octave. 00006 00007 Octave is free software; you can redistribute it and/or modify it 00008 under the terms of the GNU General Public License as published by the 00009 Free Software Foundation; either version 3 of the License, or (at your 00010 option) any later version. 00011 00012 Octave is distributed in the hope that it will be useful, but WITHOUT 00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00015 for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Octave; see the file COPYING. If not, see 00019 <http://www.gnu.org/licenses/>. 00020 00021 */ 00022 00023 #ifdef HAVE_CONFIG_H 00024 #include <config.h> 00025 #endif 00026 00027 #include "pt-cmd.h" 00028 #include "pt-walk.h" 00029 00030 // No-op. 00031 00032 tree_command * 00033 tree_no_op_command::dup (symbol_table::scope_id, 00034 symbol_table::context_id) const 00035 { 00036 return new tree_no_op_command (orig_cmd, line (), column ()); 00037 } 00038 00039 void 00040 tree_no_op_command::accept (tree_walker& tw) 00041 { 00042 tw.visit_no_op_command (*this); 00043 } 00044 00045 // Function definition. 00046 00047 tree_command * 00048 tree_function_def::dup (symbol_table::scope_id, 00049 symbol_table::context_id) const 00050 { 00051 return new tree_function_def (fcn, line (), column ()); 00052 } 00053 00054 void 00055 tree_function_def::accept (tree_walker& tw) 00056 { 00057 tw.visit_function_def (*this); 00058 }