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

            Line data    Source code
       1              : #ifndef AST_ENUM_H
       2              : #define AST_ENUM_H
       3              : 
       4              : #include "../ast.h"
       5              : #include <algorithm>
       6              : #include <string>
       7              : #include <vector>
       8              : 
       9              : namespace nicole {
      10              : 
      11              : class AST_ENUM final : public AST {
      12              : private:
      13              :   std::string id_;
      14              :   std::vector<std::string> enumIdentifiers_;
      15              : 
      16              : public:
      17              :   explicit AST_ENUM(const long long unsigned nodeId,
      18              :                     const SourceLocation &srcLoc, const std::string &id,
      19              :                     const std::vector<std::string> &enumIdentifiers) noexcept
      20            0 :       : AST(nodeId, AST_TYPE::ENUM, srcLoc), id_{id},
      21            0 :         enumIdentifiers_{enumIdentifiers} {}
      22              : 
      23            0 :   [[nodiscard]] const std::string &id() const noexcept { return id_; }
      24              : 
      25            0 :   [[nodiscard]] const std::vector<std::string> &identifiers() const noexcept {
      26            0 :     return enumIdentifiers_;
      27            0 :   }
      28              : 
      29              :   [[nodiscard]] std::expected<std::string, Error>
      30            0 :   accept(const PrintTree &visitor) const noexcept override {
      31            0 :     return visitor.visit(this);
      32            0 :   }
      33              : 
      34              :   [[nodiscard]] std::expected<bool, Error>
      35            0 :   accept(const ValidateTree &visitor) const noexcept override {
      36            0 :     return visitor.visit(this);
      37            0 :   }
      38              : 
      39              :   [[nodiscard]] std::expected<std::monostate, Error>
      40            0 :   accept(const FillSemanticInfo &visitor) const noexcept override {
      41            0 :     return visitor.visit(this);
      42            0 :   }
      43              : 
      44              :   [[nodiscard]] std::expected<std::shared_ptr<Type>, Error>
      45            0 :   accept(const TypeAnalysis &visitor) const noexcept override {
      46            0 :     return visitor.visit(this);
      47            0 :   }
      48              : 
      49              :   [[nodiscard]] std::expected<std::monostate, Error>
      50            0 :   accept(const Monomorphize &visitor) const noexcept override {
      51            0 :     return visitor.visit(this);
      52            0 :   }
      53              : 
      54              :   [[nodiscard]] std::expected<std::shared_ptr<llvm::Value>, Error>
      55            0 :   accept(const CodeGeneration &visitor) const noexcept override {
      56            0 :     return visitor.visit(this);
      57            0 :   }
      58              : };
      59              : 
      60              : } // namespace nicole
      61              : 
      62              : #endif
        

Generated by: LCOV version 2.0-1