Line data Source code
1 : #include "../../../inc/visitors/monomorphize/monomorphize.h"
2 : #include "../../../inc/parsingAnalysis/ast/utils/ast_import.h"
3 : #include "../../../inc/parsingAnalysis/ast/utils/ast_print.h"
4 : #include <variant>
5 :
6 : namespace nicole {
7 :
8 : std::expected<std::monostate, Error>
9 0 : Monomorphize::visit(const AST_PRINT *node) const noexcept {
10 0 : if (!node) {
11 0 : return createError(ERROR_TYPE::NULL_NODE, "invalid AST_PRINT");
12 0 : }
13 0 : for (const auto &chain : node->values()) {
14 0 : const auto result{chain->accept(*this)};
15 0 : if (!result) {
16 0 : return createError(result.error());
17 0 : }
18 0 : }
19 0 : return {};
20 0 : }
21 :
22 : std::expected<std::monostate, Error>
23 0 : Monomorphize::visit(const AST_IMPORT *node) const noexcept {
24 0 : if (!node) {
25 0 : return createError(ERROR_TYPE::NULL_NODE, "invalid AST_IMPORT");
26 0 : }
27 0 : return {};
28 0 : }
29 :
30 : }
|