Fixed #29: Parsers: Implement parsing memoization
Fixed #77 : Parser: ShortTermMemoryParser should be called separately Fixed #78 : Remove VariableNode usage Fixed #79 : ConceptManager: Implement compile caching Fixed #80 : SheerkaExecute : parsers_key is not correctly computed Fixed #81 : ValidateConceptEvaluator : Validate concept's where and pre clauses right after the parsing Fixed #82 : SheerkaIsAManager: isa() failed when the set as a body Fixed #83 : ValidateConceptEvaluator : Support BNF and SYA Concepts Fixed #84 : ExpressionParser: Implement the parser as a standard parser Fixed #85 : Services: Give order to services Fixed #86 : cannot manage smart_get_attr(the short, color)
This commit is contained in:
@@ -223,6 +223,8 @@ class ConceptNode(LexerNode):
|
||||
def to_short_str(self):
|
||||
return f'CN({self.concept})'
|
||||
|
||||
def get_concept(self):
|
||||
return self.concept
|
||||
|
||||
class SourceCodeNode(LexerNode):
|
||||
"""
|
||||
@@ -388,7 +390,8 @@ class SourceCodeWithConceptNode(LexerNode):
|
||||
return self._all_nodes
|
||||
|
||||
def clone(self):
|
||||
clone = SourceCodeWithConceptNode(self.first, self.last, self.nodes.copy(), self.has_unrecognized)
|
||||
nodes = [n.clone() for n in self.nodes]
|
||||
clone = SourceCodeWithConceptNode(self.first.clone(), self.last.clone(), nodes, self.has_unrecognized)
|
||||
clone.python_node = self.python_node
|
||||
clone.return_value = self.return_value
|
||||
return clone
|
||||
|
||||
Reference in New Issue
Block a user