Skip to content

Commit

Permalink
chore(zscript): Make all 'yyerror' error messages start with 'ERROR:'
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyV99 authored and connorjclark committed Aug 6, 2023
1 parent 84cd984 commit 9171697
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parser/ffscript.ypp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void trunc_str(std::string& str, size_t sz, std::string const& header, int32_t r
{
if(str.size() > sz)
{
yyerrmsg(header+": String value '" + str + "' is too long. Max '"+std::to_string(sz)+"' characters.", row, col, txt);
yyerrmsg("ERROR: "+header+": String value '" + str + "' is too long. Max '"+std::to_string(sz)+"' characters.", row, col, txt);
str = str.substr(0,sz);
}
}
Expand Down Expand Up @@ -879,7 +879,7 @@ Class_Block_List :
if(user_class->destructor)
{
auto const& loc = func->location;
yyerrmsg("Class can only have one destructor!",loc.first_line,loc.first_column,func->name.c_str());
yyerrmsg("ERROR: Class can only have one destructor!",loc.first_line,loc.first_column,func->name.c_str());
delete func;
}
else user_class->destructor = func;
Expand All @@ -905,7 +905,7 @@ Class_Block_List :
if(user_class->destructor)
{
auto const& loc = func->location;
yyerrmsg("Class can only have one destructor!",loc.first_line,loc.first_column,func->name.c_str());
yyerrmsg("ERROR: Class can only have one destructor!",loc.first_line,loc.first_column,func->name.c_str());
delete func;
}
else user_class->destructor = func;
Expand Down

0 comments on commit 9171697

Please sign in to comment.