Fixed SyaNodeParser false positive recognition issue
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user