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
03e4ab92
Commit
03e4ab92
authored
Aug 05, 2015
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pypy parser treat all complex statment as 0.0j, fix it, code orginally write by Marius
parent
8ffb67ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
src/codegen/pypa-parser.cpp
src/codegen/pypa-parser.cpp
+13
-4
No files found.
src/codegen/pypa-parser.cpp
View file @
03e4ab92
...
...
@@ -363,10 +363,19 @@ struct expr_dispatcher {
}
ResultPtr
read
(
pypa
::
AstComplex
&
c
)
{
AST_Num
*
ptr
=
new
AST_Num
();
ptr
->
num_type
=
AST_Num
::
COMPLEX
;
pypa
::
string_to_double
(
c
.
imag
,
ptr
->
n_float
);
return
ptr
;
AST_Num
*
imag
=
new
AST_Num
();
location
(
imag
,
c
);
imag
->
num_type
=
AST_Num
::
COMPLEX
;
sscanf
(
c
.
imag
.
c_str
(),
"%lf"
,
&
imag
->
n_float
);
if
(
!
c
.
real
)
return
imag
;
AST_BinOp
*
binop
=
new
AST_BinOp
();
location
(
binop
,
c
);
binop
->
op_type
=
AST_TYPE
::
Add
;
binop
->
right
=
readItem
(
c
.
real
,
interned_strings
);
binop
->
left
=
imag
;
return
binop
;
}
ResultPtr
read
(
pypa
::
AstComprehension
&
c
)
{
...
...
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