refactor: remove unused argument to parser (#4344)

This commit is contained in:
Noorhteen Raja NJ 2021-07-01 17:47:45 +05:30 committed by GitHub
parent 86f02c0341
commit a52c364569
Failed to generate hash of commit
5 changed files with 1 additions and 24 deletions

View file

@ -68,7 +68,6 @@ def build_tables():
from xonsh.parser import Parser
Parser(
lexer_table="lexer_table",
yacc_table="parser_table",
outputdir=os.path.join(root_dir, "xonsh"),
yacc_debug=True,

View file

@ -19,7 +19,7 @@ def xonsh_builtins_autouse(xonsh_builtins):
return xonsh_builtins
PARSER = Parser(lexer_optimize=False, yacc_optimize=False, yacc_debug=True)
PARSER = Parser(yacc_optimize=False, yacc_debug=True)
def check_ast(inp, run=True, mode="eval", debug_level=0):

View file

@ -257,8 +257,6 @@ class BaseParser(object):
def __init__(
self,
lexer_optimize=True,
lexer_table="xonsh.lexer_table",
yacc_optimize=True,
yacc_table="xonsh.parser_table",
yacc_debug=False,
@ -266,10 +264,6 @@ class BaseParser(object):
):
"""Parameters
----------
lexer_optimize : bool, optional
Set to false when unstable and true when lexer is stable.
lexer_table : str, optional
Lexer module used when optimized.
yacc_optimize : bool, optional
Set to false when unstable and true when parser is stable.
yacc_table : str, optional

View file

@ -9,8 +9,6 @@ class Parser(BaseParser):
def __init__(
self,
lexer_optimize=True,
lexer_table="xonsh.lexer_table",
yacc_optimize=True,
yacc_table="xonsh.parser_table",
yacc_debug=False,
@ -19,10 +17,6 @@ class Parser(BaseParser):
"""
Parameters
----------
lexer_optimize : bool, optional
Set to false when unstable and true when lexer is stable.
lexer_table : str, optional
Lexer module used when optimized.
yacc_optimize : bool, optional
Set to false when unstable and true when parser is stable.
yacc_table : str, optional
@ -37,8 +31,6 @@ class Parser(BaseParser):
for rule in tok_rules:
self._tok_rule(rule)
super().__init__(
lexer_optimize=lexer_optimize,
lexer_table=lexer_table,
yacc_optimize=yacc_optimize,
yacc_table=yacc_table,
yacc_debug=yacc_debug,

View file

@ -10,8 +10,6 @@ class Parser(ThreeSixParser):
def __init__(
self,
lexer_optimize=True,
lexer_table="xonsh.lexer_table",
yacc_optimize=True,
yacc_table="xonsh.parser_table",
yacc_debug=False,
@ -19,10 +17,6 @@ class Parser(ThreeSixParser):
):
"""Parameters
----------
lexer_optimize : bool, optional
Set to false when unstable and true when lexer is stable.
lexer_table : str, optional
Lexer module used when optimized.
yacc_optimize : bool, optional
Set to false when unstable and true when parser is stable.
yacc_table : str, optional
@ -43,8 +37,6 @@ class Parser(ThreeSixParser):
for rule in tok_rules:
self._tok_rule(rule)
super().__init__(
lexer_optimize=lexer_optimize,
lexer_table=lexer_table,
yacc_optimize=yacc_optimize,
yacc_table=yacc_table,
yacc_debug=yacc_debug,