GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
pt-jump.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 1996-2024 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_pt_jump_h)
27 #define octave_pt_jump_h 1
28 
29 #include "octave-config.h"
30 
31 #include "pt-cmd.h"
32 #include "pt-walk.h"
33 
35 
36 // Break.
37 
39 {
40 public:
41 
42  tree_break_command (int l = -1, int c = -1)
43  : tree_command (l, c) { }
44 
45  OCTAVE_DISABLE_COPY_MOVE (tree_break_command)
46 
47  ~tree_break_command () = default;
48 
49  void accept (tree_walker& tw)
50  {
51  tw.visit_break_command (*this);
52  }
53 };
54 
55 // Continue.
56 
58 {
59 public:
60 
61  tree_continue_command (int l = -1, int c = -1)
62  : tree_command (l, c) { }
63 
64  OCTAVE_DISABLE_COPY_MOVE (tree_continue_command)
65 
66  ~tree_continue_command () = default;
67 
68  void accept (tree_walker& tw)
69  {
70  tw.visit_continue_command (*this);
71  }
72 };
73 
74 // Return.
75 
77 {
78 public:
79 
80  tree_return_command (int l = -1, int c = -1)
81  : tree_command (l, c) { }
82 
83  OCTAVE_DISABLE_COPY_MOVE (tree_return_command)
84 
85  ~tree_return_command () = default;
86 
87  void accept (tree_walker& tw)
88  {
89  tw.visit_return_command (*this);
90  }
91 };
92 
93 OCTAVE_END_NAMESPACE(octave)
94 
95 #endif
tree_break_command(int l=-1, int c=-1)
Definition: pt-jump.h:42
~tree_break_command()=default
void accept(tree_walker &tw)
Definition: pt-jump.h:49
tree_continue_command(int l=-1, int c=-1)
Definition: pt-jump.h:61
~tree_continue_command()=default
void accept(tree_walker &tw)
Definition: pt-jump.h:68
tree_return_command(int l=-1, int c=-1)
Definition: pt-jump.h:80
~tree_return_command()=default
void accept(tree_walker &tw)
Definition: pt-jump.h:87
virtual void visit_return_command(tree_return_command &)
Definition: pt-walk.cc:547
virtual void visit_continue_command(tree_continue_command &)
Definition: pt-walk.cc:193
virtual void visit_break_command(tree_break_command &)
Definition: pt-walk.cc:168
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn