more thinking required

This commit is contained in:
Anthony Scopatz 2015-01-31 19:13:08 -06:00
parent 385ecfa048
commit cce99ada3b
2 changed files with 5 additions and 0 deletions

View file

@ -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

View file

@ -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