1 /**
2  * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef ES2PANDA_IR_STATEMENT_H
17 #define ES2PANDA_IR_STATEMENT_H
18 
19 #include "ir/astNode.h"
20 
21 namespace ark::es2panda::ir {
22 class ClassElement;
23 
24 class Statement : public AstNode {
25 public:
26     Statement() = delete;
27     ~Statement() override = default;
28 
29     NO_COPY_OPERATOR(Statement);
30     NO_MOVE_SEMANTIC(Statement);
31 
32     [[nodiscard]] bool IsStatement() const noexcept override
33     {
34         return true;
35     }
36 
SetReturnType([[maybe_unused]] checker::ETSChecker *checker, [[maybe_unused]] checker::Type *type)37     virtual void SetReturnType([[maybe_unused]] checker::ETSChecker *checker, [[maybe_unused]] checker::Type *type) {}
38 
39 protected:
Statement(AstNodeType type)40     explicit Statement(AstNodeType type) : AstNode(type) {}
Statement(AstNodeType type, ModifierFlags flags)41     explicit Statement(AstNodeType type, ModifierFlags flags) : AstNode(type, flags) {}
Statement(Statement const &other)42     Statement(Statement const &other) : AstNode(static_cast<AstNode const &>(other)) {}
43 };
44 
45 }  // namespace ark::es2panda::ir
46 
47 #endif
48