GNU Octave  4.4.1
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-2018 John W. Eaton
4 
5 This file is part of Octave.
6 
7 Octave is free software: you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if ! defined (octave_pt_jump_h)
24 #define octave_pt_jump_h 1
25 
26 #include "octave-config.h"
27 
28 #include "pt-cmd.h"
29 #include "pt-walk.h"
30 
31 namespace octave
32 {
33  // Break.
34 
36  {
37  public:
38 
39  tree_break_command (int l = -1, int c = -1)
40  : tree_command (l, c) { }
41 
42  // No copying!
43 
44  tree_break_command (const tree_break_command&) = delete;
45 
47 
48  ~tree_break_command (void) = default;
49 
50  void accept (tree_walker& tw)
51  {
52  tw.visit_break_command (*this);
53  }
54 
55  static int breaking;
56  };
57 
58  // Continue.
59 
61  {
62  public:
63 
64  tree_continue_command (int l = -1, int c = -1)
65  : tree_command (l, c) { }
66 
67  // No copying!
68 
70 
72 
73  ~tree_continue_command (void) = default;
74 
75  void accept (tree_walker& tw)
76  {
77  tw.visit_continue_command (*this);
78  }
79 
80  static int continuing;
81  };
82 
83  // Return.
84 
86  {
87  public:
88 
89  tree_return_command (int l = -1, int c = -1)
90  : tree_command (l, c) { }
91 
92  // No copying!
93 
94  tree_return_command (const tree_return_command&) = delete;
95 
97 
98  ~tree_return_command (void) = default;
99 
100  void accept (tree_walker& tw)
101  {
102  tw.visit_return_command (*this);
103  }
104 
105  static int returning;
106  };
107 }
108 
109 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
110 
111 OCTAVE_DEPRECATED (4.4, "use 'octave::tree_break_command' instead")
112 typedef octave::tree_break_command tree_break_command;
113 
114 OCTAVE_DEPRECATED (4.4, "use 'octave::tree_continue_command' instead")
115 typedef octave::tree_continue_command tree_continue_command;
116 
117 OCTAVE_DEPRECATED (4.4, "use 'octave::tree_return_command' instead")
118 typedef octave::tree_return_command tree_return_command;
119 
120 #endif
121 
122 #endif
tree_continue_command(int l=-1, int c=-1)
Definition: pt-jump.h:64
virtual void visit_return_command(tree_return_command &)=0
~tree_break_command(void)=default
~tree_return_command(void)=default
~tree_continue_command(void)=default
tree_break_command & operator=(const tree_break_command &)=delete
tree_return_command(int l=-1, int c=-1)
Definition: pt-jump.h:89
virtual void visit_break_command(tree_break_command &)=0
void accept(tree_walker &tw)
Definition: pt-jump.h:50
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
Definition: file-io.cc:587
tree_continue_command & operator=(const tree_continue_command &)=delete
void accept(tree_walker &tw)
Definition: pt-jump.h:75
tree_return_command & operator=(const tree_return_command &)=delete
void accept(tree_walker &tw)
Definition: pt-jump.h:100
tree_break_command(int l=-1, int c=-1)
Definition: pt-jump.h:39
virtual void visit_continue_command(tree_continue_command &)=0