LCOV - code coverage report
Current view: top level - src/visitors/codeGeneration - codeGenVector.cc (source / functions) Coverage Total Hit
Test: coverage.info Lines: 0.0 % 22 0
Test Date: 2025-04-18 15:53:49 Functions: 0.0 % 2 0

            Line data    Source code
       1              : #include "../../../inc/visitors/codeGeneration/codeGeneration.h"
       2              : 
       3              : #include "../../../inc/parsingAnalysis/ast/vector/ast_index.h"
       4              : #include "../../../inc/parsingAnalysis/ast/vector/ast_vector.h"
       5              : 
       6              : #include <cstddef>
       7              : #include <memory>
       8              : #include <variant>
       9              : 
      10              : namespace nicole {
      11              : 
      12              : std::expected<std::shared_ptr<llvm::Value>, Error>
      13            0 : CodeGeneration::visit(const AST_VECTOR *node) const noexcept {
      14            0 :   if (!node) {
      15            0 :     return createError(ERROR_TYPE::NULL_NODE, "invalid AST_VECTOR");
      16            0 :   }
      17            0 :   for (const auto &value : node->values()) {
      18            0 :     const auto result{value->accept(*this)};
      19            0 :     if (!result) {
      20            0 :       return createError(result.error());
      21            0 :     }
      22            0 :   }
      23            0 :   return {};
      24            0 : }
      25              : 
      26              : std::expected<std::shared_ptr<llvm::Value>, Error>
      27            0 : CodeGeneration::visit(const AST_INDEX *node) const noexcept {
      28            0 :   if (!node) {
      29            0 :     return createError(ERROR_TYPE::NULL_NODE, "invalid AST_INDEX");
      30            0 :   }
      31            0 :   const auto result{node->index()->accept(*this)};
      32            0 :   if (!result) {
      33            0 :     return createError(result.error());
      34            0 :   }
      35            0 :   return {};
      36            0 : }
      37              : 
      38              : } // namespace nicole
        

Generated by: LCOV version 2.0-1