mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-06 06:58:46 +00:00
start of expression type check reconstruction
This commit is contained in:
parent
fefe3a910d
commit
9ee8d5c849
2 changed files with 9 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@ public:
|
|||
|
||||
//
|
||||
|
||||
virtual void operator()() = 0;
|
||||
|
||||
template <typename T, typename... Args> T New(Args... args) {
|
||||
return executor.template New<T>(std::move(args)...);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue