Concept validation must be requested

This commit is contained in:
2020-03-09 12:23:53 +01:00
parent ef31a4807d
commit 1bde97b5e3
27 changed files with 346 additions and 280 deletions
+3 -4
View File
@@ -239,6 +239,7 @@ class Sheerka(Concept):
with ExecutionContext(self.key, event, self, f"Evaluating '{text}'", self.log) as execution_context:
user_input = self.ret(self.name, True, self.new(BuiltinConcepts.USER_INPUT, body=text, user_name=user_name))
reduce_requested = self.ret(self.name, True, self.new(BuiltinConcepts.REDUCE_REQUESTED))
#execution_context.local_hints.add(BuiltinConcepts.EVAL_WHERE_REQUESTED)
steps = [
BuiltinConcepts.BEFORE_PARSING,
@@ -332,17 +333,15 @@ class Sheerka(Concept):
return self.sets_handler.get_set_elements(context, concept)
def evaluate_concept(self, context, concept: Concept, evaluate_body=False):
def evaluate_concept(self, context, concept: Concept):
"""
Evaluation a concept
It means that if the where clause is True, will evaluate the body
:param evaluate_body:
:param context:
:param concept:
:param evaluate_body:
:return: value of the evaluation or error
"""
return self.evaluate_concept_handler.evaluate_concept(context, concept, evaluate_body)
return self.evaluate_concept_handler.evaluate_concept(context, concept)
def add_in_cache(self, concept: Concept):
"""