GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
pt-check.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_check_h)
27 #define octave_pt_check_h 1
28 
29 #include "octave-config.h"
30 
31 #include <string>
32 
33 #include "pt-walk.h"
34 
35 namespace octave
36 {
37  class tree_decl_command;
38 
39  // How to check the semantics of the code that the parse trees represent.
40 
41  class tree_checker : public tree_walker
42  {
43  public:
44 
45  tree_checker (void)
46  : m_do_lvalue_check (false), m_file_name () { }
47 
48  // No copying!
49 
50  tree_checker (const tree_checker&) = delete;
51 
53 
54  ~tree_checker (void) = default;
55 
57 
59 
61 
63 
65 
67 
68  private:
69 
71 
72  std::string m_file_name;
73 
74  OCTAVE_NORETURN void errmsg (const std::string& msg, int line);
75  };
76 }
77 
78 #endif
void visit_argument_list(tree_argument_list &)
Definition: pt-check.cc:38
tree_checker(const tree_checker &)=delete
std::string m_file_name
Definition: pt-check.h:72
OCTAVE_NORETURN void errmsg(const std::string &msg, int line)
Definition: pt-check.cc:173
tree_checker & operator=(const tree_checker &)=delete
void visit_simple_assignment(tree_simple_assignment &)
Definition: pt-check.cc:133
~tree_checker(void)=default
void visit_complex_for_command(tree_complex_for_command &)
Definition: pt-check.cc:82
void visit_simple_for_command(tree_simple_for_command &)
Definition: pt-check.cc:55
void visit_try_catch_command(tree_try_catch_command &)
Definition: pt-check.cc:150
void visit_multi_assignment(tree_multi_assignment &)
Definition: pt-check.cc:113