Skip to content

Commit 470536e

Browse files
committed
Various flow improvements
1 parent b5b773f commit 470536e

6 files changed

Lines changed: 218 additions & 211 deletions

File tree

source/Executor.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "verbs/Interpret.inl"
1111
#include "verbs/Create.inl"
1212
#include "inner/Missing.hpp"
13+
#include "inner/Redundant.hpp"
1314

1415
#if 0
1516
#define VERBOSE(...) Logger::Verbose(__VA_ARGS__)
@@ -427,20 +428,21 @@ namespace Langulus::Flow
427428

428429
// Integrate the verb source to environment
429430
Many localSource;
430-
if (not Execute(verb.GetSource(), context, localSource, true, silent)) {
431-
// It's considered error only if verb is not monocast
432-
if (not silent)
433-
FLOW_ERRORS("Error at source of: ", verb);
434-
return false;
431+
if (not verb.GetSource().Is<Inner::Redundant>()) {
432+
if (not Execute(verb.GetSource(), context, localSource, true, silent)) {
433+
if (not silent)
434+
FLOW_ERRORS("Error at source of: ", verb);
435+
return false;
436+
}
435437
}
438+
else localSource = verb.GetSource().Get<Inner::Redundant>().mContent;
436439

437440
if (localSource.IsInvalid())
438441
localSource = context;
439442

440443
// Integrate the verb argument to the source
441444
Many localArgument;
442445
if (not Execute(verb.GetArgument(), localSource, localArgument, true, silent)) {
443-
// It's considered error only if verb is not monocast
444446
if (not silent)
445447
FLOW_ERRORS("Error at argument of: ", verb);
446448
return false;

0 commit comments

Comments
 (0)