/src/WasmEdge/include/ast/expression.h
Line | Count | Source |
1 | | // SPDX-License-Identifier: Apache-2.0 |
2 | | // SPDX-FileCopyrightText: 2019-2024 Second State INC |
3 | | |
4 | | //===-- wasmedge/ast/expression.h - Expression class definition -----------===// |
5 | | // |
6 | | // Part of the WasmEdge Project. |
7 | | // |
8 | | //===----------------------------------------------------------------------===// |
9 | | /// |
10 | | /// \file |
11 | | /// This file contains the declaration of the Expression node class, which is |
12 | | /// the expression node in AST. |
13 | | /// |
14 | | //===----------------------------------------------------------------------===// |
15 | | #pragma once |
16 | | |
17 | | #include "ast/instruction.h" |
18 | | |
19 | | namespace WasmEdge { |
20 | | namespace AST { |
21 | | |
22 | | /// AST Expression node. |
23 | | class Expression { |
24 | | public: |
25 | | /// Getter of instructions vector. |
26 | 29.2k | InstrView getInstrs() const noexcept { return Instrs; } |
27 | 52.3k | InstrVec &getInstrs() noexcept { return Instrs; } |
28 | | |
29 | | private: |
30 | | /// \name Data of Expression. |
31 | | /// @{ |
32 | | InstrVec Instrs; |
33 | | /// @} |
34 | | }; |
35 | | |
36 | | } // namespace AST |
37 | | } // namespace WasmEdge |