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
0f9fb5fc
Commit
0f9fb5fc
authored
Nov 27, 2012
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better exception reporting for non-child visits.
parent
c08ac4ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
Cython/Compiler/Visitor.py
Cython/Compiler/Visitor.py
+10
-15
No files found.
Cython/Compiler/Visitor.py
View file @
0f9fb5fc
...
...
@@ -159,23 +159,13 @@ class TreeVisitor(object):
@
cython
.
final
def
_visit
(
self
,
obj
):
try
:
handler_method
=
self
.
dispatch_table
[
type
(
obj
)]
except
KeyError
:
handler_method
=
self
.
find_handler
(
obj
)
self
.
dispatch_table
[
type
(
obj
)]
=
handler_method
return
handler_method
(
obj
)
@
cython
.
final
def
_visitchild
(
self
,
child
,
parent
,
attrname
,
idx
):
self
.
access_path
.
append
((
parent
,
attrname
,
idx
))
try
:
try
:
handler_method
=
self
.
dispatch_table
[
type
(
child
)]
handler_method
=
self
.
dispatch_table
[
type
(
obj
)]
except
KeyError
:
handler_method
=
self
.
find_handler
(
child
)
self
.
dispatch_table
[
type
(
child
)]
=
handler_method
re
sult
=
handler_method
(
child
)
handler_method
=
self
.
find_handler
(
obj
)
self
.
dispatch_table
[
type
(
obj
)]
=
handler_method
re
turn
handler_method
(
obj
)
except
Errors
.
CompileError
:
raise
except
Errors
.
AbortError
:
...
...
@@ -183,7 +173,12 @@ class TreeVisitor(object):
except
Exception
,
e
:
if
DebugFlags
.
debug_no_exception_intercept
:
raise
self
.
_raise_compiler_error
(
child
,
e
)
self
.
_raise_compiler_error
(
obj
,
e
)
@
cython
.
final
def
_visitchild
(
self
,
child
,
parent
,
attrname
,
idx
):
self
.
access_path
.
append
((
parent
,
attrname
,
idx
))
result
=
self
.
_visit
(
child
)
self
.
access_path
.
pop
()
return
result
...
...
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