summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/highlevelil.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/highlevelil.py b/python/highlevelil.py
index cd073df6..c80354b7 100644
--- a/python/highlevelil.py
+++ b/python/highlevelil.py
@@ -44,6 +44,7 @@ from .commonil import (
Loop, ControlFlow, Memory, Constant, Arithmetic, DoublePrecision, Terminal, FloatingPoint, Intrinsic, Return
)
+TokenList = List['function.InstructionTextToken']
LinesType = Generator['function.DisassemblyTextLine', None, None]
ExpressionIndex = NewType('ExpressionIndex', int)
InstructionIndex = NewType('InstructionIndex', int)
@@ -366,6 +367,11 @@ class HighLevelILInstruction(BaseILInstruction):
return hash((self.function, self.expr_index))
@property
+ def tokens(self) -> TokenList:
+ """HLIL tokens taken from the HLIL text lines(read-only)"""
+ return [token for line in self.lines for token in line.tokens]
+
+ @property
def lines(self) -> LinesType:
"""HLIL text lines (read-only)"""
count = ctypes.c_ulonglong()