VarValue.get_object_of_var()
Returns corresponding object of the variable.
get_object_of_var() →
LocalVariable
|
StateVariable
|
ArgumentVariable
|
GlobalVariable
|
NoneObject
Query Example
from glider import *
def query():
instructions = Instructions().exec(1, 2)
for instruction in instructions:
components = instruction.get_components()
for component in components:
if isinstance(component, VarValue):
var_object = component.get_object_of_var()
print(var_object)
print(var_object.source_code())
return instructions
Output Example

Last updated