Call.get_arg()

Returns the i-th argument of called function

get_arg(i: int) -> Union[Value, NoneObject]

Query Example

from glider import *

def query():
    instructions = (
        Instructions()
        .with_callee_name("require")
        .calls()
        .exec(10)
    )

    for ins in instructions:
        call = ins.get_value()
        if isinstance(call, Call):
            print(call.name)
            print(call.get_arg(0).expression)
            print(call.get_arg(1).expression)

    return instructions

Output Example

Last updated