Implemented ConceptManager with concept creation, modification and deletion
This commit is contained in:
@@ -56,10 +56,6 @@ class AddConceptInSetEvaluator(OneReturnValueEvaluator):
|
||||
parents=[return_value])
|
||||
concept = res.value
|
||||
|
||||
if sheerka.has_id(concept.id) and id(concept) == id(sheerka.get_by_id(concept.id)):
|
||||
# hack because it is not possible to use sheerka.modify_concept() on a cache instance
|
||||
concept = sheerka.new((concept.name, concept.id))
|
||||
|
||||
res = _resolve(isa_node.set)
|
||||
if not res.status:
|
||||
return sheerka.ret(
|
||||
|
||||
@@ -158,7 +158,11 @@ class PythonEvaluator(OneReturnValueEvaluator):
|
||||
|
||||
context.log(f"{evaluated=}", self.name)
|
||||
debugger.debug_var("ret", evaluated)
|
||||
return sheerka.ret(self.name, True, evaluated, parents=[return_value])
|
||||
|
||||
if sheerka.isinstance(evaluated, BuiltinConcepts.RETURN_VALUE):
|
||||
return sheerka.ret(self.name, evaluated.status, evaluated.body, parents=[return_value, evaluated])
|
||||
else:
|
||||
return sheerka.ret(self.name, True, evaluated, parents=[return_value])
|
||||
|
||||
def get_globals(self, context, node, expression_only):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user