Fixed SyaNodeParser false positive recognition issue

This commit is contained in:
2020-05-15 10:36:05 +02:00
parent 6e343ba996
commit 5489ef00b9
24 changed files with 484 additions and 5741 deletions
+2 -2
View File
@@ -91,7 +91,7 @@ class AtomConceptParserHelper:
self.debug.append(token)
if self.expected_tokens[0] != BaseNodeParser.get_token_value(token):
if self.expected_tokens[0] != token.str_value:
self.errors.append(UnexpectedTokenErrorNode(
f"Found '{token}' while expecting '{self.expected_tokens[0]}'",
token,
@@ -119,7 +119,7 @@ class AtomConceptParserHelper:
forked.eat_concept(concept, pos)
concept_node = ConceptNode(concept, pos, pos)
expected = [BaseNodeParser.get_token_value(t) for t in Tokenizer(concept.name)][1:-1]
expected = [t.str_value for t in Tokenizer(concept.name)][1:-1]
if not expected:
# the concept is already matched