mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-08 07:58:44 +00:00
new compiler options in CMakeLists, fixes
This commit is contained in:
parent
9b3d2812ba
commit
17328b842c
11 changed files with 62 additions and 60 deletions
|
|
@ -29,8 +29,8 @@ bool AbstractType::operator>(const AbstractType& type) const {
|
|||
return type < *this;
|
||||
}
|
||||
|
||||
std::optional<utils::IdType> AbstractType::GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const {
|
||||
std::optional<utils::IdType> AbstractType::GetFieldType(const std::string&,
|
||||
const std::unordered_set<utils::IdType>&) const {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ bool TupleType::operator>(const TupleType& type) const {
|
|||
}
|
||||
|
||||
std::optional<utils::IdType> TupleType::GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const {
|
||||
const std::unordered_set<utils::IdType>&) const {
|
||||
for (size_t i = 0; i < fields_.size(); ++i) { // TODO: optimize??
|
||||
if (fields_[i].first.has_value() && fields_[i].first.value() == name) {
|
||||
return fields_[i].second;
|
||||
|
|
@ -198,8 +198,8 @@ bool OptionalType::operator>(const OptionalType& type) const {
|
|||
return type < *this;
|
||||
}
|
||||
|
||||
std::optional<utils::IdType> OptionalType::GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const {
|
||||
std::optional<utils::IdType> OptionalType::GetFieldType(const std::string&,
|
||||
const std::unordered_set<utils::IdType>&) const {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
|
@ -279,8 +279,8 @@ bool FunctionType::operator>(const FunctionType& type) const {
|
|||
return type < *this;
|
||||
}
|
||||
|
||||
std::optional<utils::IdType> FunctionType::GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const {
|
||||
std::optional<utils::IdType> FunctionType::GetFieldType(const std::string&,
|
||||
const std::unordered_set<utils::IdType>&) const {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
|
@ -309,8 +309,8 @@ bool ArrayType::operator>(const ArrayType& type) const {
|
|||
return type < *this;
|
||||
}
|
||||
|
||||
std::optional<utils::IdType> ArrayType::GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const {
|
||||
std::optional<utils::IdType> ArrayType::GetFieldType(const std::string&,
|
||||
const std::unordered_set<utils::IdType>&) const {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue