Implemented FunctionParser
This commit is contained in:
@@ -191,23 +191,8 @@ class ExpressionParser(BaseParser):
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__("Expression", 50, False)
|
||||
|
||||
def reset_parser(self, context, parser_input: ParserInput):
|
||||
self.context = context
|
||||
self.sheerka = context.sheerka
|
||||
self.parser_input = parser_input
|
||||
self.error_sink.clear()
|
||||
|
||||
try:
|
||||
self.parser_input.reset(False)
|
||||
self.parser_input.next_token()
|
||||
except LexerError as e:
|
||||
self.add_error(self.sheerka.new(BuiltinConcepts.ERROR, body=e), False)
|
||||
return False
|
||||
return True
|
||||
|
||||
def parse(self, context, parser_input: ParserInput):
|
||||
"""
|
||||
parser_input can be string, but text can also be an list of tokens
|
||||
:param context:
|
||||
:param parser_input:
|
||||
:return:
|
||||
|
||||
Reference in New Issue
Block a user