adding types to typeclass tree, part 1

This commit is contained in:
ProgramSnail 2023-05-19 11:55:46 +03:00
parent 17328b842c
commit d841e2754b
7 changed files with 260 additions and 167 deletions

View file

@ -350,19 +350,19 @@ public:
return &typeclass_graph_;
}
std::unordered_set<utils::IdType>
GetAnnotatedTypeTypeclassesSet(interpreter::tokens::AnnotatedType* node);
std::vector<utils::IdType>
GetAnnotatedTypeTypeclassesVector(interpreter::tokens::AnnotatedType* node);
std::unordered_map<std::string, TypeclassGraph::FunctionInfo>
GetAnnotatedTypeFunctionsMap(interpreter::tokens::AnnotatedType* node,
const interpreter::tokens::BaseNode& base_node);
std::vector<std::pair<std::string, TypeclassGraph::FunctionInfo>>
GetAnnotatedTypeFunctionsVector(interpreter::tokens::AnnotatedType* node,
const interpreter::tokens::BaseNode& base_node);
// std::unordered_set<utils::IdType>
// GetAnnotatedTypeTypeclassesSet(interpreter::tokens::AnnotatedType* node);
//
// std::vector<utils::IdType>
// GetAnnotatedTypeTypeclassesVector(interpreter::tokens::AnnotatedType* node);
//
// std::unordered_map<std::string, TypeclassGraph::FunctionInfo>
// GetAnnotatedTypeFunctionsMap(interpreter::tokens::AnnotatedType* node,
// const interpreter::tokens::BaseNode& base_node);
//
// std::vector<std::pair<std::string, TypeclassGraph::FunctionInfo>>
// GetAnnotatedTypeFunctionsVector(interpreter::tokens::AnnotatedType* node,
// const interpreter::tokens::BaseNode& base_node);
std::unordered_map<std::string, utils::IdType>* ChooseNamespaces(
utils::ClassInternalsModifier modifier,
@ -370,6 +370,9 @@ public:
std::optional<utils::IdType> AddTypeclassToGraph(utils::IdType typeclass);
// function declarations & definitions should be added latter
std::optional<utils::IdType> AddAnnotatedTypeToGraph(interpreter::tokens::AnnotatedType* node);
private:
void CollectFunctionInfo(
utils::IdType current_namespace,