GNU Octave  6.2.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-2021 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 
34 namespace octave
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  // No copying!
46 
48 
50 
51  ~tree_break_command (void) = default;
52 
53  void accept (tree_walker& tw)
54  {
55  tw.visit_break_command (*this);
56  }
57  };
58 
59  // Continue.
60 
62  {
63  public:
64 
65  tree_continue_command (int l = -1, int c = -1)
66  : tree_command (l, c) { }
67 
68  // No copying!
69 
71 
73 
74  ~tree_continue_command (void) = default;
75 
76  void accept (tree_walker& tw)
77  {
78  tw.visit_continue_command (*this);
79  }
80  };
81 
82  // Return.
83 
85  {
86  public:
87 
88  tree_return_command (int l = -1, int c = -1)
89  : tree_command (l, c) { }
90 
91  // No copying!
92 
94 
96 
97  ~tree_return_command (void) = default;
98 
99  void accept (tree_walker& tw)
100  {
101  tw.visit_return_command (*this);
102  }
103  };
104 }
105 
106 #endif
tree_break_command(int l=-1, int c=-1)
Definition: pt-jump.h:42
tree_break_command & operator=(const tree_break_command &)=delete
tree_break_command(const tree_break_command &)=delete
~tree_break_command(void)=default
void accept(tree_walker &tw)
Definition: pt-jump.h:53
void accept(tree_walker &tw)
Definition: pt-jump.h:76
tree_continue_command & operator=(const tree_continue_command &)=delete
tree_continue_command(const tree_continue_command &)=delete
~tree_continue_command(void)=default
tree_continue_command(int l=-1, int c=-1)
Definition: pt-jump.h:65
tree_return_command(int l=-1, int c=-1)
Definition: pt-jump.h:88
~tree_return_command(void)=default
tree_return_command & operator=(const tree_return_command &)=delete
tree_return_command(const tree_return_command &)=delete
void accept(tree_walker &tw)
Definition: pt-jump.h:99
virtual void visit_return_command(tree_return_command &)
Definition: pt-walk.cc:417
virtual void visit_break_command(tree_break_command &)
Definition: pt-walk.cc:75
virtual void visit_continue_command(tree_continue_command &)
Definition: pt-walk.cc:98