Skip to content

Commit

Permalink
Fix bug in if transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Apr 29, 2019
1 parent 0ecf70d commit 01b191b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion magma/syntax/combinational.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ class IfTransformer(ast.NodeTransformer):
def __init__(self, filename, lines):
super().__init__()
self.filename = filename
self.lines, self.starting_line = lines
if lines:
self.lines, self.starting_line = lines
else:
self.lines, self.starting_line = None, None

def flatten(self, _list):
"""1-deep flatten"""
Expand Down

0 comments on commit 01b191b

Please sign in to comment.