mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-07 15:38:47 +00:00
part of type_check_visitor
This commit is contained in:
parent
94ef8702fb
commit
f7e985a448
10 changed files with 377 additions and 88 deletions
31
include/builtin_methods.hpp
Normal file
31
include/builtin_methods.hpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
// for clangd
|
||||
#include "types.hpp"
|
||||
#include "utils.hpp"
|
||||
|
||||
// TODO
|
||||
|
||||
namespace info {
|
||||
|
||||
struct BuiltinFunction {
|
||||
public:
|
||||
BuiltinFunction(const std::vector<utils::IdType>& argument_types, utils::IdType return_type)
|
||||
: argument_types(argument_types), return_type(return_type) {}
|
||||
|
||||
static std::optional<BuiltinFunction> FindMethod(const std::string& name, info::type::TypeManager& type_manager) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
static std::optional<BuiltinFunction> FindStaticMethod(const std::string& name, info::type::TypeManager& type_manager) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
public:
|
||||
std::vector<utils::IdType> argument_types;
|
||||
utils::IdType return_type;
|
||||
};
|
||||
|
||||
} // namespace info
|
||||
Loading…
Add table
Add a link
Reference in a new issue