vex-ast 0.2.6__py3-none-any.whl → 0.2.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vex_ast/ast/navigator.py +16 -0
- {vex_ast-0.2.6.dist-info → vex_ast-0.2.7.dist-info}/METADATA +1 -1
- {vex_ast-0.2.6.dist-info → vex_ast-0.2.7.dist-info}/RECORD +6 -6
- {vex_ast-0.2.6.dist-info → vex_ast-0.2.7.dist-info}/WHEEL +0 -0
- {vex_ast-0.2.6.dist-info → vex_ast-0.2.7.dist-info}/licenses/LICENSE +0 -0
- {vex_ast-0.2.6.dist-info → vex_ast-0.2.7.dist-info}/top_level.txt +0 -0
vex_ast/ast/navigator.py
CHANGED
@@ -211,6 +211,22 @@ class AstNavigator:
|
|
211
211
|
if hasattr(access.object, 'name') and getattr(access.object, 'name') == object_name:
|
212
212
|
result.append(access)
|
213
213
|
return result
|
214
|
+
|
215
|
+
def find_assignments_to(self, variable_name: str) -> List[Assignment]:
|
216
|
+
"""Find all assignments to a variable.
|
217
|
+
|
218
|
+
Args:
|
219
|
+
variable_name: The variable name
|
220
|
+
|
221
|
+
Returns:
|
222
|
+
List of assignments to the variable
|
223
|
+
"""
|
224
|
+
result = []
|
225
|
+
for assignment in self.find_all(Assignment):
|
226
|
+
# Check if the target is a simple variable reference
|
227
|
+
if hasattr(assignment.target, 'name') and getattr(assignment.target, 'name') == variable_name:
|
228
|
+
result.append(assignment)
|
229
|
+
return result
|
214
230
|
|
215
231
|
|
216
232
|
def create_navigator(ast_node: IAstNode) -> AstNavigator:
|
@@ -7,7 +7,7 @@ vex_ast/ast/core.py,sha256=Q7Rqww_88XnaNcMdKSqfOD7i8v5bzoBzpv-wcbvTbS4,2741
|
|
7
7
|
vex_ast/ast/expressions.py,sha256=XY5oI_nW0STSUt36V5x8-I7QIgHH9iqINBIs8RAqF8I,9680
|
8
8
|
vex_ast/ast/interfaces.py,sha256=mRGu4yOFdRUul21Ixvs8cvhdQwQEeMYzFuALYo8LHQE,6656
|
9
9
|
vex_ast/ast/literals.py,sha256=lE56-57hLXShXSKaX16hA6tY_zahKZz9d_uoiFAMWV4,2698
|
10
|
-
vex_ast/ast/navigator.py,sha256=
|
10
|
+
vex_ast/ast/navigator.py,sha256=5-gQZnvifYVC-yKgDXl1pGIFPY7KnquVbzRKQKC5sbc,8364
|
11
11
|
vex_ast/ast/operators.py,sha256=2X0XftjPcW3V8_0yR-0_-Diej-uo-DYAOSFKyZ0rdB4,3295
|
12
12
|
vex_ast/ast/statements.py,sha256=IygLbbPFrApacbCBTBg0OFU4DRMtoL2mvkKQ4aLKHNw,12192
|
13
13
|
vex_ast/ast/validators.py,sha256=gTude4HH5sBr4hl8sAp_eV6PI331uYIwpPlQTS7ChTU,4795
|
@@ -57,8 +57,8 @@ vex_ast/visitors/analyzer.py,sha256=8uuJA00h4g6cski7vmcCQfDVfpJF-2DkU_y5dF5mUC8,
|
|
57
57
|
vex_ast/visitors/base.py,sha256=Wgf0wholPhZkV4oN5IWN34A1tKItENZCN96vbBEhD1k,5111
|
58
58
|
vex_ast/visitors/printer.py,sha256=2H9gwGXXRsa6xZyiQE5cNfsGGjn71bBQ-T-gdXiPCOs,7281
|
59
59
|
vex_ast/visitors/transformer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
60
|
-
vex_ast-0.2.
|
61
|
-
vex_ast-0.2.
|
62
|
-
vex_ast-0.2.
|
63
|
-
vex_ast-0.2.
|
64
|
-
vex_ast-0.2.
|
60
|
+
vex_ast-0.2.7.dist-info/licenses/LICENSE,sha256=IOSlfCuxGv4OAg421BRDKVi16RZ7-5kCMJ4B16r4kuc,69
|
61
|
+
vex_ast-0.2.7.dist-info/METADATA,sha256=jLtSE2FPejBd-j96oqYCAM92G6-nXt3Na5ce0kBU-JY,6551
|
62
|
+
vex_ast-0.2.7.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
63
|
+
vex_ast-0.2.7.dist-info/top_level.txt,sha256=MoZGrpKgNUDiqL9gWp4q3wMw3q93XPEEjmBNPJQcNAs,8
|
64
|
+
vex_ast-0.2.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|