Permalink
Browse files

Fix typo in last commit.

Minor style changes.
  • Loading branch information...
Andy Chu
Andy Chu committed Mar 20, 2018
1 parent 410d82a commit 4c9c89ed9ea633ed58037e9421ade4e0ce78b727
Showing with 3 additions and 4 deletions.
  1. +2 −3 opy/compiler2/pycodegen.py
  2. +1 −1 opy/opy_main.py
@@ -268,8 +268,7 @@ def set_lineno(self, node, force=False):
then, this method works around missing line numbers.
"""
lineno = getattr(node, 'lineno', None)
if lineno is not None and (lineno != self.last_lineno
or force):
if lineno is not None and (lineno != self.last_lineno or force):
self.emit('SET_LINENO', lineno)
self.last_lineno = lineno
return True
@@ -435,7 +434,7 @@ def visitFor(self, node):
self.emit('GET_ITER')
self.nextBlock(start)
self.set_lineno(node, force=1)
self.set_lineno(node, force=True)
self.emit('FOR_ITER', anchor)
self.visit(node.assign)
self.visit(node.body)
View
@@ -217,7 +217,7 @@ def OpyCommandMain(argv):
with open(py_path) as f:
tokens = tokenize.generate_tokens(f.readline)
p = parse.Parser(gr, convert=py2st)
parses_tree = driver.PushTokens(p, tokens, FILE_INPUT)
parse_tree = driver.PushTokens(p, tokens, FILE_INPUT)
if isinstance(parse_tree, tuple):
n = CountTupleTree(parse_tree)

0 comments on commit 4c9c89e

Please sign in to comment.