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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
f10294d7
Commit
f10294d7
authored
Jul 19, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code writer support for cascaded assignment nodes and string nodes
parent
43e736db
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
Cython/CodeWriter.py
Cython/CodeWriter.py
+15
-1
No files found.
Cython/CodeWriter.py
View file @
f10294d7
...
...
@@ -123,12 +123,26 @@ class CodeWriter(TreeVisitor):
self
.
visit
(
node
.
rhs
)
self
.
endline
()
def
visit_CascadedAssignmentNode
(
self
,
node
):
self
.
startline
()
for
lhs
in
node
.
lhs_list
:
self
.
visit
(
lhs
)
self
.
put
(
u" = "
)
self
.
visit
(
node
.
rhs
)
self
.
endline
()
def
visit_NameNode
(
self
,
node
):
self
.
putname
(
node
.
name
)
def
visit_IntNode
(
self
,
node
):
self
.
put
(
node
.
value
)
def
visit_StringNode
(
self
,
node
):
value
=
node
.
value
if
value
.
encoding
is
not
None
:
value
=
value
.
encode
(
value
.
encoding
)
self
.
put
(
repr
(
value
))
def
visit_IfStatNode
(
self
,
node
):
# The IfClauseNode is handled directly without a seperate match
# for clariy.
...
...
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