clean-up: Bugfixes in passing
Discovered through design-related code analysis Knowledge-Technology(Claude) spotted discrepancies that led to these fixes. Remark: the irregular ordering of check predicates stems from the way I developed the logic and bears no meaning.
This commit is contained in:
parent
0661b27c74
commit
f0cdb2f5d2
3 changed files with 11 additions and 11 deletions
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
/** @file format-util.hpp
|
||||
** Collection of small helpers and convenience shortcuts for diagnostics & formatting.
|
||||
** - util::str() performs a failsafe to-String conversion, thereby preferring a
|
||||
** - util::toString() performs a failsafe to-String conversion, thereby preferring a
|
||||
** built-in conversion operator, falling back to just a mangled type string.
|
||||
** - util::join() generates an enumerating string from elements
|
||||
** of an arbitrary sequence or iterable. Elements will be passed
|
||||
|
|
|
|||
|
|
@ -542,8 +542,8 @@ namespace lib {
|
|||
addCode(COND);
|
||||
break;
|
||||
case TagSyntax::END_IF:
|
||||
addLead();
|
||||
__checkBalanced(IF);
|
||||
addLead();
|
||||
if (hasElse())
|
||||
linkJumpToNext();
|
||||
else
|
||||
|
|
@ -557,8 +557,8 @@ namespace lib {
|
|||
addCode(ITER);
|
||||
break;
|
||||
case TagSyntax::END_FOR:
|
||||
addLead();
|
||||
__checkBalanced(FOR);
|
||||
addLead();
|
||||
if (hasElse())
|
||||
linkJumpToNext();
|
||||
else
|
||||
|
|
@ -570,9 +570,9 @@ namespace lib {
|
|||
closeScope();
|
||||
break;
|
||||
case TagSyntax::ELSE:
|
||||
addLead();
|
||||
__checkInScope();
|
||||
__checkNoDup();
|
||||
addLead();
|
||||
if (IF == scope_.top().clause)
|
||||
{
|
||||
markJumpInScope();
|
||||
|
|
|
|||
|
|
@ -175,13 +175,13 @@ namespace control {
|
|||
Symbol instanceID{prototypeID, invocationID};
|
||||
Command& instance = table_[instanceID];
|
||||
if (instance)
|
||||
throw new error::Logic (_Fmt{"Attempt to create a new Command instance '%s', "
|
||||
"while an instance for this invocationID %s "
|
||||
"is currently open for parametrisation and "
|
||||
"not yet dispatched for execution."}
|
||||
% instanceID % invocationID
|
||||
, LERR_(DUPLICATE_COMMAND)
|
||||
);
|
||||
throw error::Logic (_Fmt{"Attempt to create a new Command instance '%s', "
|
||||
"while an instance for this invocationID %s "
|
||||
"is currently open for parametrisation and "
|
||||
"not yet dispatched for execution."}
|
||||
% instanceID % invocationID
|
||||
, LERR_(DUPLICATE_COMMAND)
|
||||
);
|
||||
// create new clone from the prototype
|
||||
table_[instanceID] = move (Command::get(prototypeID).newInstance());
|
||||
ENSURE (instance, "cloning of command prototype failed");
|
||||
|
|
|
|||
Loading…
Reference in a new issue