mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 00:14:41 +01:00
refactor: remove unused argument to parser (#4344)
This commit is contained in:
parent
86f02c0341
commit
a52c364569
5 changed files with 1 additions and 24 deletions
1
setup.py
1
setup.py
|
@ -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,
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue