From 9ee8d5c849d80044e74c982ea2165c7b9b33d4ac Mon Sep 17 00:00:00 2001 From: programsnail Date: Sun, 28 Jul 2024 20:29:23 +0300 Subject: [PATCH] start of expression type check reconstruction --- lang/type_check/include/expression_type_check.hpp | 10 +++++++++- lang/utils/include/executor.hpp | 2 -- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lang/type_check/include/expression_type_check.hpp b/lang/type_check/include/expression_type_check.hpp index 12c937a..c8f4153 100644 --- a/lang/type_check/include/expression_type_check.hpp +++ b/lang/type_check/include/expression_type_check.hpp @@ -1,7 +1,6 @@ #pragma once #include "expression_nodes.hpp" -#include "sources_manager.hpp" #include "type_check_utils.hpp" #include "type_nodes.hpp" #include "utils.hpp" @@ -12,6 +11,15 @@ namespace type_check { +// TODO: ??? +// TODO: add State to Executor and Task +class CheckTask : public Task { + using Task::Task; + + Result operator()(const nodes::Expression &expr, + const Arguments &arguments); // check +}; + Result check(const nodes::Expression &expression, SourcesManager &sources_manager, State &state, const Arguments &arguments); diff --git a/lang/utils/include/executor.hpp b/lang/utils/include/executor.hpp index 1cbaa73..a1d96b2 100644 --- a/lang/utils/include/executor.hpp +++ b/lang/utils/include/executor.hpp @@ -59,8 +59,6 @@ public: // - virtual void operator()() = 0; - template T New(Args... args) { return executor.template New(std::move(args)...); }