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
a91f6187
Commit
a91f6187
authored
Dec 04, 2014
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set lineno on these constructed AST nodes
parent
8ffb10cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
src/core/cfg.cpp
src/core/cfg.cpp
+6
-0
No files found.
src/core/cfg.cpp
View file @
a91f6187
...
...
@@ -1145,6 +1145,9 @@ public:
bool
visit_import
(
AST_Import
*
node
)
override
{
for
(
AST_alias
*
a
:
node
->
names
)
{
AST_LangPrimitive
*
import
=
new
AST_LangPrimitive
(
AST_LangPrimitive
::
IMPORT_NAME
);
import
->
lineno
=
node
->
lineno
;
import
->
col_offset
=
node
->
col_offset
;
import
->
args
.
push_back
(
new
AST_Num
());
static_cast
<
AST_Num
*>
(
import
->
args
[
0
])
->
num_type
=
AST_Num
::
INT
;
static_cast
<
AST_Num
*>
(
import
->
args
[
0
])
->
n_int
=
-
1
;
...
...
@@ -1186,6 +1189,9 @@ public:
RELEASE_ASSERT
(
node
->
level
==
0
,
""
);
AST_LangPrimitive
*
import
=
new
AST_LangPrimitive
(
AST_LangPrimitive
::
IMPORT_NAME
);
import
->
lineno
=
node
->
lineno
;
import
->
col_offset
=
node
->
col_offset
;
import
->
args
.
push_back
(
new
AST_Num
());
static_cast
<
AST_Num
*>
(
import
->
args
[
0
])
->
num_type
=
AST_Num
::
INT
;
static_cast
<
AST_Num
*>
(
import
->
args
[
0
])
->
n_int
=
node
->
level
;
...
...
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