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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
e9cbbf22
Commit
e9cbbf22
authored
16 years ago
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better fix for include/comments, squelch internal compiler exceptions if previous errors.
parent
eb1a531e
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+5
-1
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+1
-2
Cython/Compiler/Scanning.py
Cython/Compiler/Scanning.py
+2
-2
No files found.
Cython/Compiler/Main.py
View file @
e9cbbf22
...
@@ -19,7 +19,7 @@ import Errors
...
@@ -19,7 +19,7 @@ import Errors
import
Parsing
import
Parsing
import
Version
import
Version
from
Scanning
import
PyrexScanner
,
FileSourceDescriptor
from
Scanning
import
PyrexScanner
,
FileSourceDescriptor
from
Errors
import
PyrexError
,
CompileError
,
error
from
Errors
import
PyrexError
,
CompileError
,
InternalError
,
error
from
Symtab
import
BuiltinScope
,
ModuleScope
from
Symtab
import
BuiltinScope
,
ModuleScope
from
Cython
import
Utils
from
Cython
import
Utils
from
Cython.Utils
import
open_new_file
,
replace_suffix
from
Cython.Utils
import
open_new_file
,
replace_suffix
...
@@ -170,6 +170,10 @@ class Context:
...
@@ -170,6 +170,10 @@ class Context:
except
CompileError
,
err
:
except
CompileError
,
err
:
# err is set
# err is set
Errors
.
report_error
(
err
)
Errors
.
report_error
(
err
)
except
InternalError
,
err
:
# Only raise if there was not an earlier error
if
Errors
.
num_errors
==
0
:
raise
return
(
err
,
data
)
return
(
err
,
data
)
def
find_module
(
self
,
module_name
,
def
find_module
(
self
,
module_name
,
...
...
This diff is collapsed.
Click to expand it.
Cython/Compiler/Parsing.py
View file @
e9cbbf22
...
@@ -1271,8 +1271,7 @@ def p_include_statement(s, ctx):
...
@@ -1271,8 +1271,7 @@ def p_include_statement(s, ctx):
s
.
included_files
.
append
(
include_file_name
)
s
.
included_files
.
append
(
include_file_name
)
f
=
Utils
.
open_source_file
(
include_file_path
,
mode
=
"rU"
)
f
=
Utils
.
open_source_file
(
include_file_path
,
mode
=
"rU"
)
source_desc
=
FileSourceDescriptor
(
include_file_path
)
source_desc
=
FileSourceDescriptor
(
include_file_path
)
s2
=
PyrexScanner
(
f
,
source_desc
,
s
,
source_encoding
=
f
.
encoding
)
s2
=
PyrexScanner
(
f
,
source_desc
,
s
,
source_encoding
=
f
.
encoding
,
parse_comments
=
s
.
parse_comments
)
s2
.
parse_comments
=
s
.
parse_comments
try
:
try
:
tree
=
p_statement_list
(
s2
,
ctx
)
tree
=
p_statement_list
(
s2
,
ctx
)
finally
:
finally
:
...
...
This diff is collapsed.
Click to expand it.
Cython/Compiler/Scanning.py
View file @
e9cbbf22
...
@@ -290,7 +290,7 @@ class PyrexScanner(Scanner):
...
@@ -290,7 +290,7 @@ class PyrexScanner(Scanner):
resword_dict
=
build_resword_dict
()
resword_dict
=
build_resword_dict
()
def
__init__
(
self
,
file
,
filename
,
parent_scanner
=
None
,
def
__init__
(
self
,
file
,
filename
,
parent_scanner
=
None
,
scope
=
None
,
context
=
None
,
source_encoding
=
None
):
scope
=
None
,
context
=
None
,
source_encoding
=
None
,
parse_comments
=
True
):
Scanner
.
__init__
(
self
,
get_lexicon
(),
file
,
filename
)
Scanner
.
__init__
(
self
,
get_lexicon
(),
file
,
filename
)
if
parent_scanner
:
if
parent_scanner
:
self
.
context
=
parent_scanner
.
context
self
.
context
=
parent_scanner
.
context
...
@@ -306,7 +306,7 @@ class PyrexScanner(Scanner):
...
@@ -306,7 +306,7 @@ class PyrexScanner(Scanner):
self
.
compile_time_env
=
initial_compile_time_env
()
self
.
compile_time_env
=
initial_compile_time_env
()
self
.
compile_time_eval
=
1
self
.
compile_time_eval
=
1
self
.
compile_time_expr
=
0
self
.
compile_time_expr
=
0
self
.
parse_comments
=
True
self
.
parse_comments
=
parse_comments
self
.
source_encoding
=
source_encoding
self
.
source_encoding
=
source_encoding
self
.
trace
=
trace_scanner
self
.
trace
=
trace_scanner
self
.
indentation_stack
=
[
0
]
self
.
indentation_stack
=
[
0
]
...
...
This diff is collapsed.
Click to expand it.
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