Fixed RET functionnality misbehaviour
This commit is contained in:
@@ -196,6 +196,19 @@ class ConceptNode(LexerNode):
|
||||
clone = ConceptNode(self.concept, self.start, self.end, self.tokens, self.source, self.underlying)
|
||||
return clone
|
||||
|
||||
def as_bag(self):
|
||||
"""
|
||||
Creates a dictionary with the useful properties of the ConceptNode
|
||||
see Concept.as_bag() for extra informations
|
||||
"""
|
||||
bag = {}
|
||||
for k, v in self.__dict__.items():
|
||||
bag[k] = v
|
||||
|
||||
# if isinstance(self.concept, Concept):
|
||||
# bag["compiled"] = self.concept.compiled
|
||||
return bag
|
||||
|
||||
|
||||
class SourceCodeNode(LexerNode):
|
||||
"""
|
||||
@@ -528,7 +541,7 @@ class CNC(CN):
|
||||
to_compare = {k: v for k, v in other.concept.compiled.items() if k != ConceptParts.BODY}
|
||||
else:
|
||||
to_compare = other.concept.compiled
|
||||
if self.compiled == to_compare: # expanded form to ease the debug
|
||||
if self.compiled == to_compare: # expanded form to ease the debug
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user