コード例 #1
0
ファイル: pseudo.py プロジェクト: Rinoahu/PeachPy
 def __init__(self, label, origin=None):
     label = check_operand(label)
     self.operands = (label,)
     super(LABEL, self).__init__("LABEL", origin=origin)
     if not isinstance(label, Label):
         raise SyntaxError("Invalid operand for LABEL statement: Label object expected")
     self.identifier = label.name
     self.input_branches = set()
     if peachpy.stream.active_stream is not None:
         peachpy.stream.active_stream.add_instruction(self)
コード例 #2
0
ファイル: pseudo.py プロジェクト: moneytech/PeachPy
 def __init__(self, label, origin=None):
     label = check_operand(label)
     self.operands = (label, )
     super(LABEL, self).__init__("LABEL", origin=origin)
     if not isinstance(label, Label):
         raise SyntaxError(
             "Invalid operand for LABEL statement: Label object expected")
     self.identifier = label.name
     self.input_branches = set()
     if peachpy.stream.active_stream is not None:
         peachpy.stream.active_stream.add_instruction(self)