mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
more thinking required
This commit is contained in:
parent
385ecfa048
commit
cce99ada3b
2 changed files with 5 additions and 0 deletions
|
@ -1298,6 +1298,8 @@ def test_dollar_name_set():
|
|||
def test_dollar_py_set():
|
||||
yield check_xonsh, {'WAKKA': 42}, 'x = "WAKKA"; ${x} = 65'
|
||||
|
||||
def test_dollar_sub():
|
||||
yield check_xonsh_ast, {}, '$(ls file)'
|
||||
|
||||
|
||||
#DEBUG_LEVEL = 1
|
||||
|
|
|
@ -1382,6 +1382,7 @@ class Parser(object):
|
|||
| FALSE
|
||||
| DOLLAR NAME
|
||||
| DOLLAR LBRACE test RBRACE
|
||||
| DOLLAR LPAREN yield_expr_or_testlist_comp RPAREN
|
||||
"""
|
||||
p1 = p[1]
|
||||
if len(p) == 2:
|
||||
|
@ -1455,6 +1456,8 @@ class Parser(object):
|
|||
idx = ast.Index(value=p[3])
|
||||
p0 = ast.Subscript(value=xenv, slice=idx, ctx=ast.Load(),
|
||||
lineno=lineno, col_offset=col)
|
||||
elif p2 == '(':
|
||||
assert False
|
||||
else:
|
||||
assert False
|
||||
return p0
|
||||
|
|
Loading…
Add table
Reference in a new issue