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
da72a44c
Commit
da72a44c
authored
Aug 07, 2015
by
Rudi Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stub implementation for Ellipsis.
parent
b1b8d67c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
0 deletions
+19
-0
src/analysis/scoping_analysis.cpp
src/analysis/scoping_analysis.cpp
+1
-0
src/codegen/parser.cpp
src/codegen/parser.cpp
+8
-0
src/codegen/serialize_ast.cpp
src/codegen/serialize_ast.cpp
+1
-0
src/core/ast.cpp
src/core/ast.cpp
+4
-0
src/core/cfg.cpp
src/core/cfg.cpp
+5
-0
No files found.
src/analysis/scoping_analysis.cpp
View file @
da72a44c
...
...
@@ -524,6 +524,7 @@ public:
// bool visit_classdef(AST_ClassDef *node) override { return false; }
bool
visit_continue
(
AST_Continue
*
node
)
override
{
return
false
;
}
bool
visit_dict
(
AST_Dict
*
node
)
override
{
return
false
;
}
bool
visit_ellipsis
(
AST_Ellipsis
*
node
)
override
{
return
false
;
}
bool
visit_excepthandler
(
AST_ExceptHandler
*
node
)
override
{
return
false
;
}
bool
visit_expr
(
AST_Expr
*
node
)
override
{
return
false
;
}
bool
visit_extslice
(
AST_ExtSlice
*
node
)
override
{
return
false
;
}
...
...
src/codegen/parser.cpp
View file @
da72a44c
...
...
@@ -384,6 +384,12 @@ AST_DictComp* read_dictcomp(BufferedReader* reader) {
return
rtn
;
}
AST_Ellipsis
*
read_ellipsis
(
BufferedReader
*
reader
)
{
AST_Ellipsis
*
rtn
=
new
AST_Ellipsis
();
rtn
->
col_offset
=
-
1
;
rtn
->
lineno
=
-
1
;
return
rtn
;
}
AST_ExceptHandler
*
read_excepthandler
(
BufferedReader
*
reader
)
{
AST_ExceptHandler
*
rtn
=
new
AST_ExceptHandler
();
...
...
@@ -822,6 +828,8 @@ AST_expr* readASTExpr(BufferedReader* reader) {
return
read_dict
(
reader
);
case
AST_TYPE
:
:
DictComp
:
return
read_dictcomp
(
reader
);
case
AST_TYPE
:
:
Ellipsis
:
return
read_ellipsis
(
reader
);
case
AST_TYPE
:
:
ExtSlice
:
return
read_extslice
(
reader
);
case
AST_TYPE
:
:
GeneratorExp
:
...
...
src/codegen/serialize_ast.cpp
View file @
da72a44c
...
...
@@ -277,6 +277,7 @@ private:
writeExpr
(
node
->
value
);
return
true
;
}
virtual
bool
visit_ellipsis
(
AST_Ellipsis
*
node
)
{
return
true
;
}
virtual
bool
visit_excepthandler
(
AST_ExceptHandler
*
node
)
{
writeStmtVector
(
node
->
body
);
writeColOffset
(
node
->
col_offset
);
...
...
src/core/ast.cpp
View file @
da72a44c
...
...
@@ -2034,6 +2034,10 @@ public:
output
->
push_back
(
node
);
return
false
;
}
virtual
bool
visit_ellipsis
(
AST_Ellipsis
*
node
)
{
output
->
push_back
(
node
);
return
false
;
}
virtual
bool
visit_excepthandler
(
AST_ExceptHandler
*
node
)
{
output
->
push_back
(
node
);
return
false
;
...
...
src/core/cfg.cpp
View file @
da72a44c
...
...
@@ -855,6 +855,8 @@ private:
return
rtn
;
}
AST_expr
*
remapEllipsis
(
AST_Ellipsis
*
node
)
{
return
node
;
}
AST_expr
*
remapExtSlice
(
AST_ExtSlice
*
node
)
{
AST_ExtSlice
*
rtn
=
new
AST_ExtSlice
();
rtn
->
lineno
=
node
->
lineno
;
...
...
@@ -1183,6 +1185,9 @@ private:
case
AST_TYPE
:
:
DictComp
:
rtn
=
remapScopedComprehension
<
AST_Dict
>
(
ast_cast
<
AST_DictComp
>
(
node
));
break
;
case
AST_TYPE
:
:
Ellipsis
:
rtn
=
remapEllipsis
(
ast_cast
<
AST_Ellipsis
>
(
node
));
break
;
case
AST_TYPE
:
:
ExtSlice
:
rtn
=
remapExtSlice
(
ast_cast
<
AST_ExtSlice
>
(
node
));
break
;
...
...
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