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
ff6e4f8f
Commit
ff6e4f8f
authored
Mar 25, 2015
by
Chris Toshok
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skip expression statements that are constant strings (docstrings)
parent
704ec9a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
src/codegen/ast_interpreter.cpp
src/codegen/ast_interpreter.cpp
+5
-1
src/codegen/irgen/irgenerator.cpp
src/codegen/irgen/irgenerator.cpp
+2
-1
No files found.
src/codegen/ast_interpreter.cpp
View file @
ff6e4f8f
...
...
@@ -611,7 +611,11 @@ Value ASTInterpreter::visit_stmt(AST_stmt* node) {
case
AST_TYPE
:
:
Delete
:
return
visit_delete
((
AST_Delete
*
)
node
);
case
AST_TYPE
:
:
Expr
:
return
visit_expr
((
AST_Expr
*
)
node
);
// docstrings are str constant expression statements.
// ignore those while interpreting.
if
((((
AST_Expr
*
)
node
)
->
value
)
->
type
!=
AST_TYPE
::
Str
)
return
visit_expr
((
AST_Expr
*
)
node
);
break
;
case
AST_TYPE
:
:
FunctionDef
:
return
visit_functionDef
((
AST_FunctionDef
*
)
node
);
case
AST_TYPE
:
:
Pass
:
...
...
src/codegen/irgen/irgenerator.cpp
View file @
ff6e4f8f
...
...
@@ -1991,7 +1991,8 @@ private:
doDelete
(
ast_cast
<
AST_Delete
>
(
node
),
unw_info
);
break
;
case
AST_TYPE
:
:
Expr
:
doExpr
(
ast_cast
<
AST_Expr
>
(
node
),
unw_info
);
if
((((
AST_Expr
*
)
node
)
->
value
)
->
type
!=
AST_TYPE
::
Str
)
doExpr
(
ast_cast
<
AST_Expr
>
(
node
),
unw_info
);
break
;
case
AST_TYPE
:
:
FunctionDef
:
doFunctionDef
(
ast_cast
<
AST_FunctionDef
>
(
node
),
unw_info
);
...
...
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