Skip to content

Commit

Permalink
Fix warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
dillof committed Jan 5, 2024
1 parent 47a2150 commit 1f25fa8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/ValueExpression.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "Base64.h"
#include "ParseException.h"

ValueExpression::ValueExpression(const Token &token) {
ValueExpression::ValueExpression(const Token& token) {
if (token.is_value()) {
value_ = token.as_value();
}
Expand All @@ -46,8 +46,7 @@ ValueExpression::ValueExpression(const Token &token) {
}
}


void ValueExpression::serialize_sub(std::ostream &stream) const {
void ValueExpression::serialize_sub(std::ostream& stream) const {
switch (value()->type()) {
case Value::BINARY: {
stream << "{{";
Expand Down Expand Up @@ -88,6 +87,10 @@ void ValueExpression::serialize_sub(std::ostream &stream) const {
case Value::VOID:
stream << "void";
break;

case Value::INTEGER:
case Value::NUMBER:
throw Exception("internal error: value can't have abstract type %s", value()->type_name().c_str());
}
}

Expand All @@ -98,4 +101,4 @@ std::optional<Value> ValueExpression::maximum_value() const {
else {
return {};
}
}
}

0 comments on commit 1f25fa8

Please sign in to comment.