mirror of
https://github.com/louisrubet/rpn
synced 2025-01-16 03:41:28 +01:00
#56: added error case in preprocess()
This commit is contained in:
parent
3b72e9d714
commit
201966fe2e
1 changed files with 10 additions and 1 deletions
|
@ -574,8 +574,17 @@ public:
|
|||
//fill 'end' branch of 'else'
|
||||
((branch*)seq_obj(vlayout[layout_index].index_else))->arg2 = i;
|
||||
else
|
||||
{
|
||||
//fill 'end' branch of 'then'
|
||||
if (vlayout[layout_index].index_then != -1)
|
||||
((branch*)seq_obj(vlayout[layout_index].index_then))->arg2 = i;
|
||||
else
|
||||
{
|
||||
// error: show it
|
||||
show_syntax_error("missing then before end");
|
||||
return ret_syntax;
|
||||
}
|
||||
}
|
||||
layout_index--;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue