Line data Source code
1 : #ifndef AST_PARAMETRIZED_SUBRUTINE_DECL_H
2 : #define AST_PARAMETRIZED_SUBRUTINE_DECL_H
3 :
4 : #include "ast_subrutineDecl.h"
5 : #include "parameters.h"
6 : #include <memory>
7 : #include <string>
8 :
9 : namespace nicole {
10 :
11 : class AST_PARAMETRIZED_SUBRUTINE_DECL : public AST_SUBRUTINE_DECL {
12 : private:
13 : mutable Parameters params_;
14 :
15 : public:
16 : explicit AST_PARAMETRIZED_SUBRUTINE_DECL(
17 : const long long unsigned nodeId, const AST_TYPE type,
18 : const SourceLocation &srcLoc, const std::string &id,
19 : const Parameters ¶ms, const std::shared_ptr<Type> &returnType,
20 : const std::shared_ptr<AST_BODY> &body) noexcept
21 0 : : AST_SUBRUTINE_DECL(nodeId, type, srcLoc, id, returnType, body),
22 0 : params_{params} {}
23 :
24 0 : [[nodiscard]] const Parameters ¶meters() const noexcept {
25 0 : return params_;
26 0 : }
27 :
28 0 : void setParameters(const Parameters ¶ms) const noexcept {
29 0 : params_ = params;
30 0 : }
31 : };
32 :
33 : } // namespace nicole
34 :
35 : #endif
|