mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
remove unused Token and add parent attribute
Adding a parent attribute helped but wasn't working with amalgamated xonsh -- turns out there's a separate Token definition in tokenize that is never used but does redefine Token once it's hit -- this was causing crashes on my end.
This commit is contained in:
parent
d728bf7673
commit
6ddfbe7691
2 changed files with 2 additions and 1 deletions
|
@ -11,6 +11,8 @@ class _TokenType(tuple):
|
|||
This class was forked from the mainline prompt-toolkit repo.
|
||||
Copyright (c) 2014, Jonathan Slenders, All rights reserved.
|
||||
"""
|
||||
parent = None
|
||||
|
||||
def __getattr__(self, val):
|
||||
if not val or not val[0].isupper():
|
||||
return tuple.__getattribute__(self, val)
|
||||
|
|
|
@ -249,7 +249,6 @@ Special = group(r'\r?\n', r'\.\.\.', r'[:;.,@]')
|
|||
Funny = group(Operator, Bracket, Special)
|
||||
|
||||
PlainToken = group(IORedirect, Number, Funny, String, Name_RE, SearchPath)
|
||||
Token = Ignore + PlainToken
|
||||
|
||||
# First (or only) line of ' or " string.
|
||||
ContStr = group(StringPrefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*" +
|
||||
|
|
Loading…
Add table
Reference in a new issue