Commit f10294d7 authored by Stefan Behnel's avatar Stefan Behnel

code writer support for cascaded assignment nodes and string nodes

parent 43e736db
...@@ -123,12 +123,26 @@ class CodeWriter(TreeVisitor): ...@@ -123,12 +123,26 @@ class CodeWriter(TreeVisitor):
self.visit(node.rhs) self.visit(node.rhs)
self.endline() 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): def visit_NameNode(self, node):
self.putname(node.name) self.putname(node.name)
def visit_IntNode(self, node): def visit_IntNode(self, node):
self.put(node.value) 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): def visit_IfStatNode(self, node):
# The IfClauseNode is handled directly without a seperate match # The IfClauseNode is handled directly without a seperate match
# for clariy. # for clariy.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment