Refactored Concept class for better separation of metadata, compiled and values
This commit is contained in:
+4
-1
@@ -86,7 +86,7 @@ class CallNodeConcept(NodeConcept):
|
||||
super().__init__(BuiltinConcepts.IDENTIFIER_NODE, "Call", parent)
|
||||
|
||||
def get_args_names(self, sheerka):
|
||||
return sheerka.values(self.get_prop("args"))
|
||||
return sheerka.get_values(self.get_prop("args"))
|
||||
|
||||
|
||||
def python_to_concept(python_node):
|
||||
@@ -105,6 +105,7 @@ def python_to_concept(python_node):
|
||||
continue
|
||||
|
||||
value = getattr(node, field)
|
||||
concept.def_prop(field)
|
||||
if isinstance(value, list):
|
||||
lst = ListConcept().init_key()
|
||||
for i in value:
|
||||
@@ -114,6 +115,8 @@ def python_to_concept(python_node):
|
||||
concept.set_prop(field, _transform(value, NodeParent(concept, field)))
|
||||
else:
|
||||
concept.set_prop(field, value)
|
||||
|
||||
concept.metadata.is_evaluated = True
|
||||
return concept
|
||||
|
||||
return _transform(python_node, None)
|
||||
|
||||
Reference in New Issue
Block a user