mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
add ?( token to lexer
This commit is contained in:
parent
0d3519f954
commit
c7a61c3728
1 changed files with 4 additions and 0 deletions
|
@ -211,6 +211,10 @@ def handle_question(state, token, stream):
|
|||
n.string == '?' and n.start == token.end:
|
||||
state['last'] = n
|
||||
yield _new_token('DOUBLE_QUESTION', '??', token.start)
|
||||
elif (n is not None and n.type == tokenize.OP
|
||||
and n.string == '(' and n.start == token.end):
|
||||
state['last'] = n
|
||||
yield _new_token('QUESTION_LPAREN', '?(', token.start)
|
||||
else:
|
||||
state['last'] = token
|
||||
yield _new_token('QUESTION', '?', token.start)
|
||||
|
|
Loading…
Add table
Reference in a new issue