multiline eval support

This commit is contained in:
marauder2k7 2024-06-07 20:44:44 +01:00
parent 8140ed9b64
commit 1c43959c07
4 changed files with 107 additions and 111 deletions

View file

@ -3352,18 +3352,15 @@ yyreport_syntax_error (const yypcontext_t *ctx)
output += String::ToString("%s %s", i == 0 ? ": expected" : "or", yysymbol_name(expected[i]));
}
if(CMDGetCurrentFile())
if (lines.size() > 0)
{
if (lines.size() > 0)
output += "\n";
for (int i = 0; i < lines.size(); i++)
{
output += "\n";
for (int i = 0; i < lines.size(); i++)
{
int line = lines.size() - i;
output += String::ToString("%5d | ", loc->first_line - (line-1)) + lines[i] + "\n";
}
output += String::ToString("%5s | %*s", "", loc->first_column, "^");
int line = lines.size() - i;
output += String::ToString("%5d | ", loc->first_line - (line-1)) + lines[i] + "\n";
}
output += String::ToString("%5s | %*s", "", loc->first_column, "^");
}
yyerror(output.c_str());