This commit is contained in:
Bart Louwers
2024-08-11 15:04:14 +02:00
committed by GitHub
parent 60c1d351cf
commit 544f918c17
34 changed files with 97 additions and 89 deletions

View File

@@ -224,7 +224,7 @@ public:
virtual void eachChild(const std::function<void(const Expression&)>&) const = 0;
virtual bool operator==(const Expression&) const = 0;
bool operator!=(const Expression& rhs) const noexcept { return !operator==(rhs); }
bool operator!=(const Expression&) const = default;
Kind getKind() const noexcept { return kind; };
const type::Type& getType() const noexcept { return type; };

View File

@@ -35,7 +35,7 @@ public:
defaultValue.match([&fn](const style::PropertyExpression<T>& e) { fn(e.getExpression()); }, [](const T&) {});
}
bool operator==(const Expression& e) const final {
bool operator==(const Expression& e) const final override {
if (e.getKind() == Kind::FormatSectionOverride) {
const auto* other = static_cast<const FormatSectionOverride*>(&e);
@@ -60,6 +60,8 @@ public:
return false;
}
bool operator==(const FormatSectionOverride& other) const { return *this == static_cast<const Expression&>(other); }
std::vector<std::optional<Value>> possibleOutputs() const final { return {std::nullopt}; }
std::string getOperator() const final { return "format-section-override"; }