mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2026-01-25 13:07:13 +00:00
variable namespace, function declaration fixes
This commit is contained in:
parent
c31b20fa24
commit
f973f65b5b
17 changed files with 511 additions and 98 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
// for clangd
|
||||
#include "symbols_info.hpp"
|
||||
#include "type_graph.hpp"
|
||||
#include "type_manager.hpp"
|
||||
#include "utils.hpp"
|
||||
|
||||
namespace info {
|
||||
|
|
@ -22,8 +22,8 @@ public:
|
|||
void AddImport(ImportInfo&& import_info, const std::optional<std::string>& name = std::nullopt);
|
||||
|
||||
void AddEnterNamespace(const std::string& name,
|
||||
const std::optional<NamespaceInfo::Modifier>& modifier = std::nullopt,
|
||||
const std::optional<std::string>& variable = std::nullopt);
|
||||
const std::optional<NamespaceInfo::Modifier>& modifier = std::nullopt,
|
||||
const std::optional<std::string>& variable = std::nullopt);
|
||||
|
||||
void EnterNamespace(const std::string& name);
|
||||
|
||||
|
|
@ -60,8 +60,8 @@ public:
|
|||
return global_info_.CreateVisitor();
|
||||
}
|
||||
|
||||
TypeGraph* GetAbstractTypeGraph() {
|
||||
return global_info_.GetAbstractTypeGraph();
|
||||
type::TypeManager* GetTypeManager() {
|
||||
return global_info_.GetTypeManager();
|
||||
}
|
||||
|
||||
GlobalInfo* GetGlobalInfo() {
|
||||
|
|
@ -92,8 +92,8 @@ public:
|
|||
return NamespaceVisitor(*this);
|
||||
}
|
||||
|
||||
TypeGraph* GetAbstractTypeGraph() {
|
||||
return &abstract_type_graph_;
|
||||
type::TypeManager* GetTypeManager() {
|
||||
return &type_manager_;
|
||||
}
|
||||
|
||||
// TODO: remember about vector realloc
|
||||
|
|
@ -116,7 +116,7 @@ private:
|
|||
std::vector<TypeInfo> types_;
|
||||
std::vector<TypeclassInfo> typeclasses_;
|
||||
|
||||
info::TypeGraph abstract_type_graph_;
|
||||
type::TypeManager type_manager_;
|
||||
|
||||
NamespaceInfo global_namespace_;
|
||||
std::vector<ImportInfo> imports_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue