Fixed initialisation issue for concepts with BNF definition

This commit is contained in:
2019-12-20 12:25:15 +01:00
parent 5c95d918ad
commit 69f8c2835f
7 changed files with 112 additions and 41 deletions
+2 -1
View File
@@ -29,12 +29,13 @@ class ConceptEvaluator(OneReturnValueEvaluator):
def eval(self, context, return_value):
sheerka = context.sheerka
concept = return_value.value.value
context.log(self.verbose_log, f"Evaluating concept {concept}.", self.name)
# pre condition should already be validated by the parser.
# It's a mandatory condition for the concept before it can be recognized
if len(concept.cached_asts) == 0:
sheerka.initialize_concept_asts(context, concept)
sheerka.initialize_concept_asts(context, concept, self.verbose_log)
# TODO; check pre
# if pre is not true, return Concept with a false value