GNU Octave
10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Loading...
Searching...
No Matches
pt-check.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (C) 1996-2025 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
OCTAVE_BEGIN_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
()
46
: m_do_lvalue_check (false), m_file_name () { }
47
48
OCTAVE_DISABLE_COPY_MOVE (
tree_checker
)
49
50
~tree_checker
() =
default
;
51
52
void
visit_argument_list
(
tree_argument_list
&);
53
54
void
visit_simple_for_command
(
tree_simple_for_command
&);
55
56
void
visit_complex_for_command
(
tree_complex_for_command
&);
57
58
void
visit_multi_assignment
(
tree_multi_assignment
&);
59
60
void
visit_simple_assignment
(
tree_simple_assignment
&);
61
62
void
visit_try_catch_command
(
tree_try_catch_command
&);
63
64
private
:
65
66
bool
m_do_lvalue_check;
67
68
std::string m_file_name;
69
70
OCTAVE_NORETURN
void
errmsg (
const
std::string& msg,
int
line);
71
};
72
73
OCTAVE_END_NAMESPACE(octave)
74
75
#endif
tree_argument_list
Definition
pt-arg-list.h:53
tree_checker
Definition
pt-check.h:42
tree_checker::visit_complex_for_command
void visit_complex_for_command(tree_complex_for_command &)
Definition
pt-check.cc:82
tree_checker::~tree_checker
~tree_checker()=default
tree_checker::visit_simple_for_command
void visit_simple_for_command(tree_simple_for_command &)
Definition
pt-check.cc:55
tree_checker::tree_checker
tree_checker()
Definition
pt-check.h:45
tree_checker::visit_simple_assignment
void visit_simple_assignment(tree_simple_assignment &)
Definition
pt-check.cc:133
tree_checker::visit_multi_assignment
void visit_multi_assignment(tree_multi_assignment &)
Definition
pt-check.cc:113
tree_checker::visit_argument_list
void visit_argument_list(tree_argument_list &)
Definition
pt-check.cc:38
tree_checker::visit_try_catch_command
void visit_try_catch_command(tree_try_catch_command &)
Definition
pt-check.cc:150
tree_complex_for_command
Definition
pt-loop.h:189
tree_decl_command
Definition
pt-decl.h:184
tree_multi_assignment
Definition
pt-assign.h:119
tree_simple_assignment
Definition
pt-assign.h:53
tree_simple_for_command
Definition
pt-loop.h:124
tree_try_catch_command
Definition
pt-except.h:43
tree_walker
Definition
pt-walk.h:111
OCTAVE_BEGIN_NAMESPACE
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
pt-walk.h
libinterp
parse-tree
pt-check.h
Generated on Sat Aug 2 2025 06:52:13 for GNU Octave by
1.9.8