Commit bb076b09 authored by Craig Citro's avatar Craig Citro

seperated -> separated

parent 2b1548d8
...@@ -61,7 +61,7 @@ class CodeWriter(TreeVisitor): ...@@ -61,7 +61,7 @@ class CodeWriter(TreeVisitor):
self.startline(s) self.startline(s)
self.endline() self.endline()
def comma_seperated_list(self, items, output_rhs=False): def comma_separated_list(self, items, output_rhs=False):
if len(items) > 0: if len(items) > 0:
for item in items[:-1]: for item in items[:-1]:
self.visit(item) self.visit(item)
...@@ -82,7 +82,7 @@ class CodeWriter(TreeVisitor): ...@@ -82,7 +82,7 @@ class CodeWriter(TreeVisitor):
def visit_FuncDefNode(self, node): def visit_FuncDefNode(self, node):
self.startline(u"def %s(" % node.name) self.startline(u"def %s(" % node.name)
self.comma_seperated_list(node.args) self.comma_separated_list(node.args)
self.endline(u"):") self.endline(u"):")
self.indent() self.indent()
self.visit(node.body) self.visit(node.body)
...@@ -167,7 +167,7 @@ class CodeWriter(TreeVisitor): ...@@ -167,7 +167,7 @@ class CodeWriter(TreeVisitor):
def visit_PrintStatNode(self, node): def visit_PrintStatNode(self, node):
self.startline(u"print ") self.startline(u"print ")
self.comma_seperated_list(node.arg_tuple.args) self.comma_separated_list(node.arg_tuple.args)
if not node.append_newline: if not node.append_newline:
self.put(u",") self.put(u",")
self.endline() self.endline()
...@@ -181,7 +181,7 @@ class CodeWriter(TreeVisitor): ...@@ -181,7 +181,7 @@ class CodeWriter(TreeVisitor):
self.startline(u"cdef ") self.startline(u"cdef ")
self.visit(node.base_type) self.visit(node.base_type)
self.put(u" ") self.put(u" ")
self.comma_seperated_list(node.declarators, output_rhs=True) self.comma_separated_list(node.declarators, output_rhs=True)
self.endline() self.endline()
def visit_ForInStatNode(self, node): def visit_ForInStatNode(self, node):
...@@ -200,12 +200,12 @@ class CodeWriter(TreeVisitor): ...@@ -200,12 +200,12 @@ class CodeWriter(TreeVisitor):
self.dedent() self.dedent()
def visit_SequenceNode(self, node): def visit_SequenceNode(self, node):
self.comma_seperated_list(node.args) # Might need to discover whether we need () around tuples...hmm... self.comma_separated_list(node.args) # Might need to discover whether we need () around tuples...hmm...
def visit_SimpleCallNode(self, node): def visit_SimpleCallNode(self, node):
self.visit(node.function) self.visit(node.function)
self.put(u"(") self.put(u"(")
self.comma_seperated_list(node.args) self.comma_separated_list(node.args)
self.put(")") self.put(")")
def visit_GeneralCallNode(self, node): def visit_GeneralCallNode(self, node):
...@@ -215,7 +215,7 @@ class CodeWriter(TreeVisitor): ...@@ -215,7 +215,7 @@ class CodeWriter(TreeVisitor):
if isinstance(posarg, AsTupleNode): if isinstance(posarg, AsTupleNode):
self.visit(posarg.arg) self.visit(posarg.arg)
else: else:
self.comma_seperated_list(posarg) self.comma_separated_list(posarg)
if node.keyword_args is not None or node.starstar_arg is not None: if node.keyword_args is not None or node.starstar_arg is not None:
raise Exception("Not implemented yet") raise Exception("Not implemented yet")
self.put(u")") self.put(u")")
......
...@@ -128,7 +128,7 @@ def parse_directive_value(name, value, relaxed_bool=False): ...@@ -128,7 +128,7 @@ def parse_directive_value(name, value, relaxed_bool=False):
def parse_directive_list(s, relaxed_bool=False, ignore_unknown=False): def parse_directive_list(s, relaxed_bool=False, ignore_unknown=False):
""" """
Parses a comma-seperated list of pragma options. Whitespace Parses a comma-separated list of pragma options. Whitespace
is not considered. is not considered.
>>> parse_directive_list(' ') >>> parse_directive_list(' ')
......
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