(cls, struct: core.BNDisassemblyTextLine, il_func: Optional['ILFunctionType'] = None)
| 3520 | |
| 3521 | @classmethod |
| 3522 | def _from_core_struct(cls, struct: core.BNDisassemblyTextLine, il_func: Optional['ILFunctionType'] = None): |
| 3523 | il_instr = None |
| 3524 | if il_func is not None and struct.instrIndex < len(il_func): |
| 3525 | try: |
| 3526 | il_instr = il_func[struct.instrIndex] |
| 3527 | except: |
| 3528 | il_instr = None |
| 3529 | tokens = InstructionTextToken._from_core_struct(struct.tokens, struct.count) |
| 3530 | |
| 3531 | tags = [] |
| 3532 | for i in range(struct.tagCount): |
| 3533 | tags.append(binaryview.Tag(handle=core.BNNewTagReference(struct.tags[i]))) |
| 3534 | |
| 3535 | type_info = None |
| 3536 | if struct.typeInfo.hasTypeInfo: |
| 3537 | parent_type = None |
| 3538 | if struct.typeInfo.parentType: |
| 3539 | parent_type = types.Type.create(core.BNNewTypeReference(struct.typeInfo.parentType)) |
| 3540 | type_info = DisassemblyTextLineTypeInfo( |
| 3541 | parent_type=parent_type, |
| 3542 | field_index=struct.typeInfo.fieldIndex, |
| 3543 | offset=struct.typeInfo.offset |
| 3544 | ) |
| 3545 | |
| 3546 | return DisassemblyTextLine( |
| 3547 | tokens, |
| 3548 | struct.addr, |
| 3549 | il_instr, |
| 3550 | _highlight.HighlightColor._from_core_struct(struct.highlight), |
| 3551 | tags, |
| 3552 | type_info |
| 3553 | ) |
| 3554 | |
| 3555 | def _to_core_struct(self) -> core.BNDisassemblyTextLine: |
| 3556 | result = core.BNDisassemblyTextLine() |
nothing calls this directly
no test coverage detected