LCOV - code coverage report
Current view: top level - inc/tables/typeTable/types/basicTypes - basicTypes.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 0.0 % 18 0
Test Date: 2025-04-18 15:53:49 Functions: 0.0 % 3 0

            Line data    Source code
       1              : #ifndef BASIC_TYPES_H
       2              : #define BASIC_TYPES_H
       3              : 
       4              : #include "../type.h"
       5              : #include <string>
       6              : 
       7              : namespace nicole {
       8              : 
       9              : enum class BasicKind { Bool, Int, Float, Double, Char, Str };
      10              : 
      11              : class BasicType : public Type {
      12              : private:
      13              :   BasicKind kind_;
      14              : 
      15              : public:
      16            0 :   explicit BasicType(const BasicKind k) noexcept : kind_(k) {}
      17              : 
      18            0 :   [[nodiscard]] BasicKind baseKind() const noexcept { return kind_; }
      19              : 
      20            0 :   [[nodiscard]] std::string toString() const noexcept override {
      21            0 :     switch (kind_) {
      22            0 :     case BasicKind::Bool:
      23            0 :       return "bool";
      24            0 :     case BasicKind::Int:
      25            0 :       return "int";
      26            0 :     case BasicKind::Float:
      27            0 :       return "float";
      28            0 :     case BasicKind::Double:
      29            0 :       return "double";
      30            0 :     case BasicKind::Char:
      31            0 :       return "char";
      32            0 :     case BasicKind::Str:
      33            0 :       return "str";
      34            0 :     }
      35            0 :   }
      36              : };
      37              : 
      38              : } // namespace nicole
      39              : 
      40              : #endif
        

Generated by: LCOV version 2.0-1