pt-jump.cc

Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (C) 1996-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 "error.h"
00028 #include "oct-obj.h"
00029 #include "pt-bp.h"
00030 #include "pt-jump.h"
00031 #include "pt-walk.h"
00032 
00033 class octave_value_list;
00034 
00035 // Break.
00036 
00037 // Nonzero means we're breaking out of a loop or function body.
00038 int tree_break_command::breaking = 0;
00039 
00040 tree_command *
00041 tree_break_command::dup (symbol_table::scope_id,
00042                          symbol_table::context_id) const
00043 {
00044   return new tree_break_command (line (), column ());
00045 }
00046 
00047 void
00048 tree_break_command::accept (tree_walker& tw)
00049 {
00050   tw.visit_break_command (*this);
00051 }
00052 
00053 // Continue.
00054 
00055 // Nonzero means we're jumping to the end of a loop.
00056 int tree_continue_command::continuing = 0;
00057 
00058 tree_command *
00059 tree_continue_command::dup (symbol_table::scope_id,
00060                             symbol_table::context_id) const
00061 {
00062   return new tree_continue_command (line (), column ());
00063 }
00064 
00065 void
00066 tree_continue_command::accept (tree_walker& tw)
00067 {
00068   tw.visit_continue_command (*this);
00069 }
00070 
00071 // Return.
00072 
00073 // Nonzero means we're returning from a function.
00074 int tree_return_command::returning = 0;
00075 
00076 tree_command *
00077 tree_return_command::dup (symbol_table::scope_id,
00078                           symbol_table::context_id) const
00079 {
00080   return new tree_return_command (line (), column ());
00081 }
00082 
00083 void
00084 tree_return_command::accept (tree_walker& tw)
00085 {
00086   tw.visit_return_command (*this);
00087 }
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines