This commit is contained in:
ProgramSnail 2023-05-17 18:29:39 +03:00
parent b723fd6a65
commit 3abac1b643
6 changed files with 27 additions and 18 deletions

View file

@ -23,7 +23,6 @@ public:
struct PartitionInfo {
std::vector<std::string> path;
std::string name;
interpreter::tokens::PartitionStatement* node = nullptr;
};
@ -75,8 +74,9 @@ public:
definition::Constructor&& constructor_info,
const interpreter::tokens::BaseNode& base_node);
utils::IdType AddPartition(const std::vector<std::string>& path, // including name
interpreter::tokens::PartitionStatement* node);
utils::IdType AddPartition(const std::vector<std::string>& path,
interpreter::tokens::PartitionStatement* node,
const interpreter::tokens::BaseNode& base_node);
std::optional<utils::IdType> FindNamespaceId(const std::optional<std::vector<std::string>>& path);

View file

@ -131,7 +131,7 @@ private:
const std::vector<Key>& path,
size_t path_position) {
if (path_position == path.size()) {
if (vertex.value.has_value()) {
if (!vertex.value.has_value()) {
return std::nullopt;
}
return &vertex.value.value();