Updated list/range register resolver & applied black formatting

This commit is contained in:
stefandesouza
2023-08-26 14:51:04 +02:00
parent 76f3baf74e
commit 36549dd679
13 changed files with 486 additions and 398 deletions

View File

@@ -2,22 +2,23 @@
from osaca.parser.operand import Operand
class LabelOperand(Operand):
def __init__(self, NAME_ID = None, COMMENT_ID = None):
def __init__(self, NAME_ID=None, COMMENT_ID=None):
super().__init__(NAME_ID)
self._COMMENT_ID = COMMENT_ID
@property
def comment(self):
return self._COMMENT_ID
@comment.setter
def comment(self, comment):
self._COMMENT_ID = comment
def __iter__(self):
return self
def __next__(self):
if not self._COMMENT_ID:
raise StopIteration
@@ -28,4 +29,3 @@ class LabelOperand(Operand):
def __repr__(self):
return f"LabelOperand(NAME_ID={self._NAME_ID}, COMMENT={self._COMMENT_ID})"