Skip to content

Commit

Permalink
fix printed line count #64
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Oct 27, 2023
1 parent 7704664 commit f82df1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aipl/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ class Command:
prompt:str

def __str__(self):
return f'-> {self.opname} (line {self.linenum})'
return f'-> {self.opname} (line {self.linenum-1})' # first line is implicit !!python


class ToAst(Transformer):
def line(self, tree):
Expand Down

0 comments on commit f82df1c

Please sign in to comment.