LCOV - code coverage report
Current view: top level - inc/parsingAnalysis/ast/functions - ast_funcDecl.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 0.0 % 27 0
Test Date: 2025-04-18 15:53:49 Functions: 0.0 % 9 0

            Line data    Source code
       1              : #ifndef AST_FUNC_DECL_H
       2              : #define AST_FUNC_DECL_H
       3              : 
       4              : #include "../../../tables/typeTable/types/userTypes/genericParameter.h"
       5              : #include "ast_parametrizedSubritineDecl.h"
       6              : 
       7              : namespace nicole {
       8              : 
       9              : class AST_FUNC_DECL final : public AST_PARAMETRIZED_SUBRUTINE_DECL {
      10              : private:
      11              :   mutable std::vector<GenericParameter> generics_;
      12              : 
      13              : public:
      14              :   explicit AST_FUNC_DECL(const long long unsigned nodeId,
      15              :                          const SourceLocation &srcLoc, const std::string &id,
      16              :                          const std::vector<GenericParameter> &generics,
      17              :                          const Parameters &params,
      18              :                          const std::shared_ptr<Type> &returnType,
      19              :                          const std::shared_ptr<AST_BODY> &body) noexcept
      20            0 :       : AST_PARAMETRIZED_SUBRUTINE_DECL(nodeId, AST_TYPE::FUNC_DECL, srcLoc, id,
      21            0 :                                         params, returnType, body),
      22            0 :         generics_{generics} {}
      23              : 
      24            0 :   [[nodiscard]] const std::vector<GenericParameter> &generics() const noexcept {
      25            0 :     return generics_;
      26            0 :   }
      27              : 
      28              :   void
      29            0 :   setGenerics(const std::vector<GenericParameter> &generics) const noexcept {
      30            0 :     generics_ = generics;
      31            0 :   }
      32              : 
      33              :   [[nodiscard]] std::expected<std::string, Error>
      34            0 :   accept(const PrintTree &visitor) const noexcept override {
      35            0 :     return visitor.visit(this);
      36            0 :   }
      37              : 
      38              :   [[nodiscard]] std::expected<bool, Error>
      39            0 :   accept(const ValidateTree &visitor) const noexcept override {
      40            0 :     return visitor.visit(this);
      41            0 :   }
      42              : 
      43              :   [[nodiscard]] std::expected<std::monostate, Error>
      44            0 :   accept(const FillSemanticInfo &visitor) const noexcept override {
      45            0 :     return visitor.visit(this);
      46            0 :   }
      47              : 
      48              :   [[nodiscard]] std::expected<std::shared_ptr<Type>, Error>
      49            0 :   accept(const TypeAnalysis &visitor) const noexcept override {
      50            0 :     return visitor.visit(this);
      51            0 :   }
      52              : 
      53              :   [[nodiscard]] std::expected<std::monostate, Error>
      54            0 :   accept(const Monomorphize &visitor) const noexcept override {
      55            0 :     return visitor.visit(this);
      56            0 :   }
      57              : 
      58              :   [[nodiscard]] std::expected<std::shared_ptr<llvm::Value>, Error>
      59            0 :   accept(const CodeGeneration &visitor) const noexcept override {
      60            0 :     return visitor.visit(this);
      61            0 :   }
      62              : };
      63              : 
      64              : } // namespace nicole
      65              : 
      66              : #endif
        

Generated by: LCOV version 2.0-1