Line data Source code
1 : #include "../../../inc/visitors/monomorphize/monomorphize.h"
2 : #include "../../../inc/parsingAnalysis/ast/literals/ast_bool.h"
3 : #include "../../../inc/parsingAnalysis/ast/literals/ast_char.h"
4 : #include "../../../inc/parsingAnalysis/ast/literals/ast_double.h"
5 : #include "../../../inc/parsingAnalysis/ast/literals/ast_float.h"
6 : #include "../../../inc/parsingAnalysis/ast/literals/ast_int.h"
7 : #include "../../../inc/parsingAnalysis/ast/literals/ast_null.h"
8 : #include "../../../inc/parsingAnalysis/ast/literals/ast_string.h"
9 : #include <variant>
10 :
11 : namespace nicole {
12 :
13 : std::expected<std::monostate, Error>
14 0 : Monomorphize::visit(const AST_BOOL *node) const noexcept {
15 0 : if (!node) {
16 0 : return createError(ERROR_TYPE::NULL_NODE, "invalid AST_BOOL");
17 0 : }
18 0 : return {};
19 0 : }
20 :
21 : std::expected<std::monostate, Error>
22 0 : Monomorphize::visit(const AST_CHAR *node) const noexcept {
23 0 : if (!node) {
24 0 : return createError(ERROR_TYPE::NULL_NODE, "invalid AST_CHAR");
25 0 : }
26 0 : return {};
27 0 : }
28 :
29 : std::expected<std::monostate, Error>
30 0 : Monomorphize::visit(const AST_DOUBLE *node) const noexcept {
31 0 : if (!node) {
32 0 : return createError(ERROR_TYPE::NULL_NODE, "invalid AST_DOUBLE");
33 0 : }
34 0 : return {};
35 0 : }
36 :
37 : std::expected<std::monostate, Error>
38 0 : Monomorphize::visit(const AST_FLOAT *node) const noexcept {
39 0 : if (!node) {
40 0 : return createError(ERROR_TYPE::NULL_NODE, "invalid AST_FLOAT");
41 0 : }
42 0 : return {};
43 0 : }
44 :
45 : std::expected<std::monostate, Error>
46 0 : Monomorphize::visit(const AST_INT *node) const noexcept {
47 0 : if (!node) {
48 0 : return createError(ERROR_TYPE::NULL_NODE, "invalid AST_INT");
49 0 : }
50 0 : return {};
51 0 : }
52 :
53 : std::expected<std::monostate, Error>
54 0 : Monomorphize::visit(const AST_NULL *node) const noexcept {
55 0 : if (!node) {
56 0 : return createError(ERROR_TYPE::NULL_NODE, "invalid AST_NULL");
57 0 : }
58 0 : return {};
59 0 : }
60 :
61 : std::expected<std::monostate, Error>
62 0 : Monomorphize::visit(const AST_STRING *node) const noexcept {
63 0 : if (!node) {
64 0 : return createError(ERROR_TYPE::NULL_NODE, "invalid AST_STRING");
65 0 : }
66 0 : return {};
67 0 : }
68 :
69 : }
|