First implementation of Debugger for SyaNodeParser
This commit is contained in:
@@ -23,5 +23,11 @@ class AddToMemoryEvaluator(OneReturnValueEvaluator):
|
||||
return len(context.sheerka.services[SheerkaMemory.NAME].registration) > 0
|
||||
|
||||
def eval(self, context, return_value):
|
||||
if context.sheerka.during_initialisation:
|
||||
from core.sheerka.services.SheerkaMemory import SheerkaMemory
|
||||
service = context.sheerka.services[SheerkaMemory.NAME]
|
||||
service.registration.clear()
|
||||
return None
|
||||
|
||||
context.sheerka.add_registered_objects(context)
|
||||
return None # no need to have a second pass
|
||||
|
||||
@@ -36,10 +36,10 @@ class MultipleSameSuccessEvaluator(AllReturnValuesEvaluator):
|
||||
to_process = True
|
||||
self.eaten.append(ret)
|
||||
elif ret.who.startswith(BaseEvaluator.PREFIX):
|
||||
self.eaten.append(ret)
|
||||
if ret.status:
|
||||
nb_successful_evaluators += 1
|
||||
self.success.append(ret)
|
||||
self.eaten.append(ret)
|
||||
elif ret.who.startswith(BaseParser.PREFIX):
|
||||
self.eaten.append(ret)
|
||||
if ret.status:
|
||||
@@ -63,7 +63,7 @@ class MultipleSameSuccessEvaluator(AllReturnValuesEvaluator):
|
||||
# I gave a random order to the other
|
||||
#
|
||||
# I guess that we need a proper algorithm to elect which return value to use if they have the same result
|
||||
# I guts feeling is that, it will depend on the intent of the user
|
||||
# My guts feeling is that, it will depend on the intent of the user
|
||||
# So it depends on the context
|
||||
|
||||
# try to return a concept if possible
|
||||
|
||||
Reference in New Issue
Block a user