Fix parsing of default value

It is now always unexposed, but works better.
This commit is contained in:
Jonathan Müller 2017-03-30 13:11:21 +02:00
commit 9a0ac36715
12 changed files with 99 additions and 100 deletions

View file

@ -43,5 +43,7 @@ std::unique_ptr<cpp_expression> detail::parse_raw_expression(const parse_context
if (stream.done())
return nullptr;
auto expr = to_string(stream, end);
if (!expr.empty() && expr.back() == ';')
expr.pop_back();
return cpp_unexposed_expression::build(std::move(type), std::move(expr));
}