mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2026-01-25 13:07:13 +00:00
fixes
This commit is contained in:
parent
b723fd6a65
commit
3abac1b643
6 changed files with 27 additions and 18 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue