Fixed #127 : SyaNodeParser : Allow tokens parsing
Fixed #128 : parser_utils.get_node() : Refactor
This commit is contained in:
@@ -1152,7 +1152,7 @@ class SheerkaConceptManager(BaseService):
|
||||
:return:
|
||||
"""
|
||||
|
||||
if token.type == TokenKind.WHITESPACE:
|
||||
if token.type in (TokenKind.WHITESPACE, TokenKind.EXPR):
|
||||
return None
|
||||
|
||||
if token.type == TokenKind.STRING:
|
||||
|
||||
@@ -169,7 +169,10 @@ class ParserInput:
|
||||
return True
|
||||
|
||||
def is_empty(self):
|
||||
if self.text.strip() == "":
|
||||
if self.text is not None and self.text.strip() == "":
|
||||
return True
|
||||
|
||||
if self.from_tokens and len(self.tokens) == 0:
|
||||
return True
|
||||
|
||||
if self.end == self.start:
|
||||
|
||||
Reference in New Issue
Block a user