Skip to content
Snippets Groups Projects
Commit 0d6e34b0 authored by Sergey Bronnikov's avatar Sergey Bronnikov Committed by Igor Munkin
Browse files

test/fuzz: fix errors due to commented out code

Running of automatically generated Lua programs sometimes failed
with an errors like:

- "unexpected symbol near" (0.3%)
- "bad argument" (0.2%)
- "'then' expected near" (0.02%)

NO_CHANGELOG=testing
NO_DOC=testing
NO_TEST=testing
parent 64826780
No related branches found
No related tags found
No related merge requests found
......@@ -951,7 +951,12 @@ NESTED_PROTO_TOSTRING(ExpBinaryOpExp, binary, Expression)
NESTED_PROTO_TOSTRING(UnaryOpExp, unary, Expression)
{
std::string unary_str = UnaryOperatorToString(unary.unop());
unary_str += ExpressionToString(unary.exp());
/*
* Add a whitespace before an expression with unary minus,
* otherwise double hyphen comments the following code
* and it breaks generated programs syntactically.
*/
unary_str += " " + ExpressionToString(unary.exp());
return unary_str;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment