GNU Octave
10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Loading...
Searching...
No Matches
pt-spmd.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (C) 2020-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_spmd_command_h)
27
#define octave_pt_spmd_command_h 1
28
29
#include "octave-config.h"
30
31
#include "
pt-cmd.h
"
32
#include "
pt-walk.h
"
33
34
OCTAVE_BEGIN_NAMESPACE
(octave)
35
36
class
comment_list
;
37
class
tree_statement_list
;
38
39
// Spmd.
40
41
class
tree_spmd_command
:
public
tree_command
42
{
43
public
:
44
45
tree_spmd_command
(
const
token
& spmd_tok,
tree_statement_list
*
body
,
const
token
& end_tok)
46
: m_spmd_tok (spmd_tok), m_body (
body
), m_end_tok (end_tok)
47
{ }
48
49
OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (
tree_spmd_command
)
50
51
~tree_spmd_command
();
52
53
filepos
beg_pos
()
const
{
return
m_spmd_tok.
beg_pos
(); }
54
filepos
end_pos
()
const
{
return
m_end_tok.
end_pos
(); }
55
56
tree_statement_list
*
body
() {
return
m_body; }
57
58
void
accept
(
tree_walker
& tw)
59
{
60
tw.
visit_spmd_command
(*
this
);
61
}
62
63
private
:
64
65
token
m_spmd_tok;
66
67
// List of commands.
68
tree_statement_list
*m_body;
69
70
token
m_end_tok;
71
};
72
73
OCTAVE_END_NAMESPACE(octave)
74
75
#endif
comment_list
Definition
comment-list.h:110
filepos
Definition
filepos.h:34
token
Definition
token.h:42
token::end_pos
filepos end_pos() const
Definition
token.h:129
token::beg_pos
filepos beg_pos() const
Definition
token.h:128
tree_command
Definition
pt-cmd.h:46
tree_spmd_command
Definition
pt-spmd.h:42
tree_spmd_command::tree_spmd_command
tree_spmd_command(const token &spmd_tok, tree_statement_list *body, const token &end_tok)
Definition
pt-spmd.h:45
tree_spmd_command::body
tree_statement_list * body()
Definition
pt-spmd.h:56
tree_spmd_command::~tree_spmd_command
~tree_spmd_command()
Definition
pt-spmd.cc:36
tree_spmd_command::beg_pos
filepos beg_pos() const
Definition
pt-spmd.h:53
tree_spmd_command::end_pos
filepos end_pos() const
Definition
pt-spmd.h:54
tree_spmd_command::accept
void accept(tree_walker &tw)
Definition
pt-spmd.h:58
tree_statement_list
Definition
pt-stmt.h:142
tree_walker
Definition
pt-walk.h:111
tree_walker::visit_spmd_command
virtual void visit_spmd_command(tree_spmd_command &)
Definition
pt-walk.cc:278
OCTAVE_BEGIN_NAMESPACE
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
pt-cmd.h
pt-walk.h
libinterp
parse-tree
pt-spmd.h
Generated on Sat Aug 2 2025 06:52:13 for GNU Octave by
1.9.8