Skip to content

Commit

Permalink
Merge branch 'feature_end_lineno' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
shtaxxx committed Dec 23, 2022
2 parents 506ae6b + 8e1beb0 commit d04b8f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyverilog/vparser/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def show(self, buf=sys.stdout, offset=0, attrnames=False, showlineno=True):
buf.write(attrstr)

if showlineno:
try:
buf.write(' (from %s to %s)' %(self.lineno, self.end_lineno))
except:
if hasattr(self, 'end_lineno'):
buf.write(' (from %s to %s)' % (self.lineno, self.end_lineno))
else:
buf.write(' (at %s)' % self.lineno)

buf.write('\n')
Expand Down

0 comments on commit d04b8f3

Please sign in to comment.