Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
b1a9ceb7
Commit
b1a9ceb7
authored
Sep 18, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inject builtins after children are visited
parent
82eea7b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+5
-5
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
b1a9ceb7
...
...
@@ -2294,11 +2294,6 @@ class TransformBuiltinMethods(EnvTransform):
return
ExprNodes
.
ListNode
(
pos
,
args
=
items
)
def
visit_SimpleCallNode
(
self
,
node
):
if
isinstance
(
node
.
function
,
ExprNodes
.
NameNode
):
func_name
=
node
.
function
.
name
if
func_name
in
(
'dir'
,
'locals'
,
'vars'
):
return
self
.
_inject_locals
(
node
,
func_name
)
# cython.foo
function
=
node
.
function
.
as_cython_attribute
()
if
function
:
...
...
@@ -2351,6 +2346,11 @@ class TransformBuiltinMethods(EnvTransform):
u"'%s' not a valid cython language construct"
%
function
)
self
.
visitchildren
(
node
)
if
isinstance
(
node
,
ExprNodes
.
SimpleCallNode
)
and
node
.
function
.
is_name
:
func_name
=
node
.
function
.
name
if
func_name
in
(
'dir'
,
'locals'
,
'vars'
):
return
self
.
_inject_locals
(
node
,
func_name
)
return
node
...
...
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