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
35
36class comment_list;
38
39// Spmd.
40
42{
43public:
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
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
59 {
60 tw.visit_spmd_command (*this);
61 }
62
63private:
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
73OCTAVE_END_NAMESPACE(octave)
74
75#endif
Definition token.h:42
filepos end_pos() const
Definition token.h:129
filepos beg_pos() const
Definition token.h:128
tree_spmd_command(const token &spmd_tok, tree_statement_list *body, const token &end_tok)
Definition pt-spmd.h:45
tree_statement_list * body()
Definition pt-spmd.h:56
filepos beg_pos() const
Definition pt-spmd.h:53
filepos end_pos() const
Definition pt-spmd.h:54
void accept(tree_walker &tw)
Definition pt-spmd.h:58
virtual void visit_spmd_command(tree_spmd_command &)
Definition pt-walk.cc:278
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn