Working on #48 : Refactored FunctionParser.py
This commit is contained in:
@@ -395,18 +395,14 @@ class BaseExpressionParser(BaseParser):
|
||||
def parse_input(self, context, parser_input, error_sink):
|
||||
raise NotImplementedError
|
||||
|
||||
def inner_parse_names(self, context, parser_input, error_sink, stop_condition):
|
||||
|
||||
# def stop():
|
||||
# return token.type == TokenKind.EOF or \
|
||||
# paren_count == 0 and token.type == TokenKind.RPAR or \
|
||||
# token.type == TokenKind.IDENTIFIER and token.value in ("and", "or") or \
|
||||
# token.value == "not" and parser_input.the_token_after(True).value != "in"
|
||||
def parse_tokens_stop_condition(self, token, parser_input):
|
||||
raise NotImplementedError
|
||||
|
||||
def parse_tokens(self, context, parser_input, error_sink):
|
||||
def stop():
|
||||
return token.type == TokenKind.EOF or \
|
||||
paren_count == 0 and token.type == TokenKind.RPAR or \
|
||||
stop_condition(token, parser_input)
|
||||
self.parse_tokens_stop_condition(token, parser_input)
|
||||
|
||||
token = parser_input.token
|
||||
if token.type == TokenKind.EOF:
|
||||
|
||||
Reference in New Issue
Block a user