mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2026-01-05 18:50:08 +01:00
Updated list/range register resolver & applied black formatting
This commit is contained in:
@@ -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})"
|
||||
|
||||
Reference in New Issue
Block a user