Skip to content

Commit

Permalink
Update compiler.py
Browse files Browse the repository at this point in the history
  • Loading branch information
timofey260 authored Dec 11, 2021
1 parent aff2931 commit 432468f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ def cmp(code: list[str,]): # code compiler
line = m.split()
try: # if line be blank []
if line[0] == "MARK":
marks[line[1]] = counter
if len(line) == 3:
marks[line[1]] = int(line[2])
else:
marks[line[1]] = counter
setzero()
if line[0] in instructions:
counter += 1
Expand Down

0 comments on commit 432468f

Please sign in to comment.