Fixed RET functionnality misbehaviour

This commit is contained in:
2020-07-08 13:35:18 +02:00
parent c4399d631c
commit b768eaa95d
14 changed files with 113 additions and 29 deletions
+5 -4
View File
@@ -83,11 +83,12 @@ class AddConceptEvaluator(OneReturnValueEvaluator):
props_found.add(p)
# add variables by order of appearance when possible
for token in def_concept_node.name.tokens:
if token.value in props_found:
concept.def_var(token.value, None)
for name_part in name_to_use:
if name_part in props_found:
concept.def_var(name_part, None)
# add the remaining properties
# They mainly come from BNF definition
for p in props_found:
if p not in concept.values:
concept.def_var(p, None)
@@ -112,7 +113,7 @@ class AddConceptEvaluator(OneReturnValueEvaluator):
@staticmethod
def get_name_to_use(node):
source = node.definition if node.definition_type == DEFINITION_TYPE_DEF else node.name
return [part.value for part in core.utils.strip_tokens(source.tokens, True)]
return [part.str_value for part in core.utils.strip_tokens(source.tokens, True)]
@staticmethod
def get_variables(sheerka, ret_value, concept_name):