GNU Octave 7.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
pt-spmd.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2020-2022 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 "base-list.h"
32#include "pt-cmd.h"
33#include "pt-walk.h"
34
35namespace octave
36{
37 class tree_comment_list;
38 class tree_statement_list;
39
40 // Spmd.
41
43 {
44 public:
45
47 comment_list *tc, int l = -1, int c = -1)
48 : tree_command (l, c), m_body (body), m_lead_comm (lc), m_trail_comm (tc)
49 { }
50
51 // No copying!
52
54
56
57 ~tree_spmd_command (void);
58
59 tree_statement_list * body (void) { return m_body; }
60
62
64
66 {
67 tw.visit_spmd_command (*this);
68 }
69
70 private:
71
72 // List of commands.
74
75 // Comment preceding SPMD token.
77
78 // Comment preceding ENDSPMD token.
80 };
81}
82
83#endif
tree_spmd_command & operator=(const tree_spmd_command &)=delete
comment_list * trailing_comment(void)
Definition: pt-spmd.h:63
tree_spmd_command(tree_statement_list *body, comment_list *lc, comment_list *tc, int l=-1, int c=-1)
Definition: pt-spmd.h:46
tree_statement_list * body(void)
Definition: pt-spmd.h:59
void accept(tree_walker &tw)
Definition: pt-spmd.h:65
comment_list * leading_comment(void)
Definition: pt-spmd.h:61
comment_list * m_lead_comm
Definition: pt-spmd.h:76
tree_spmd_command(const tree_spmd_command &)=delete
comment_list * m_trail_comm
Definition: pt-spmd.h:79
tree_statement_list * m_body
Definition: pt-spmd.h:73
virtual void visit_spmd_command(tree_spmd_command &)
Definition: pt-walk.cc:259