forked from VimPlug/jedi
Remove tokens initialization parameter from the parser api.
This commit is contained in:
@@ -34,8 +34,7 @@ class BaseParser(object):
|
|||||||
ast_mapping = {}
|
ast_mapping = {}
|
||||||
default_node = tree.Node
|
default_node = tree.Node
|
||||||
|
|
||||||
def __init__(self, grammar, tokens, start_symbol='file_input',
|
def __init__(self, grammar, start_symbol='file_input', error_recovery=False):
|
||||||
error_recovery=False):
|
|
||||||
self._grammar = grammar
|
self._grammar = grammar
|
||||||
self._start_symbol = start_symbol
|
self._start_symbol = start_symbol
|
||||||
self._error_recovery = error_recovery
|
self._error_recovery = error_recovery
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class Parser(BaseParser):
|
|||||||
|
|
||||||
def __init__(self, grammar, source, start_symbol='file_input',
|
def __init__(self, grammar, source, start_symbol='file_input',
|
||||||
tokens=None, start_parsing=True):
|
tokens=None, start_parsing=True):
|
||||||
super(Parser, self).__init__(grammar, tokens, start_symbol)
|
super(Parser, self).__init__(grammar, start_symbol)
|
||||||
# Todo Remove start_parsing (with False)
|
# Todo Remove start_parsing (with False)
|
||||||
|
|
||||||
self.source = source
|
self.source = source
|
||||||
@@ -170,7 +170,6 @@ class ParserWithRecovery(Parser):
|
|||||||
# else:
|
# else:
|
||||||
super(ParserWithRecovery, self).__init__(
|
super(ParserWithRecovery, self).__init__(
|
||||||
grammar, source,
|
grammar, source,
|
||||||
tokens=tokens,
|
|
||||||
start_parsing=start_parsing
|
start_parsing=start_parsing
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user