Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
371e0542
Commit
371e0542
authored
Feb 27, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #328 from ssarangi/master
Fixes issue #294
parents
d72cf427
7b3f651e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
5 deletions
+30
-5
src/core/cfg.cpp
src/core/cfg.cpp
+30
-2
test/tests/del_multi.py
test/tests/del_multi.py
+0
-3
No files found.
src/core/cfg.cpp
View file @
371e0542
...
...
@@ -1552,11 +1552,39 @@ public:
target
=
remapName
(
ast_cast
<
AST_Name
>
(
t
));
break
;
}
case
AST_TYPE
:
:
List
:
{
AST_List
*
list
=
static_cast
<
AST_List
*>
(
t
);
AST_Delete
*
temp_ast_del
=
new
AST_Delete
();
temp_ast_del
->
lineno
=
node
->
lineno
;
temp_ast_del
->
col_offset
=
node
->
col_offset
;
for
(
auto
elt
:
list
->
elts
)
{
temp_ast_del
->
targets
.
push_back
(
elt
);
}
visit_delete
(
temp_ast_del
);
break
;
}
case
AST_TYPE
:
:
Tuple
:
{
AST_Tuple
*
tuple
=
static_cast
<
AST_Tuple
*>
(
t
);
AST_Delete
*
temp_ast_del
=
new
AST_Delete
();
temp_ast_del
->
lineno
=
node
->
lineno
;
temp_ast_del
->
col_offset
=
node
->
col_offset
;
for
(
auto
elt
:
tuple
->
elts
)
{
temp_ast_del
->
targets
.
push_back
(
elt
);
}
visit_delete
(
temp_ast_del
);
break
;
}
default:
RELEASE_ASSERT
(
0
,
"Unsupported del target: %d"
,
t
->
type
);
}
astdel
->
targets
.
push_back
(
target
);
push_back
(
astdel
);
if
(
target
!=
NULL
)
astdel
->
targets
.
push_back
(
target
);
if
(
astdel
->
targets
.
size
()
>
0
)
push_back
(
astdel
);
}
return
true
;
...
...
test/tests/del_multi.py
View file @
371e0542
# expected: fail
# - we don't support this functionality yet
def
f4
():
a
=
1
b
=
2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment