titus.pfaast.UserFcn

class titus.pfaast.UserFcn(name, sig)[source]

Bases: titus.fcn.Fcn

Represents a user-defined function.

__init__(name, sig)
Parameters:
  • name (string) – name of the function
  • sig (titus.signature.Sig) – function signature (note that titus.signature.Sigs is not allowed for user-defined functions)
static fromFcnDef(n, fcnDef)

Create an executable function object from an abstract syntax tree of a function definition.

Parameters:
Return type:

titus.pfaast.UserFcn

Returns:

the executable function

genpy(paramTypes, args, pos=None)

Generate an executable Python string for this function; usually `call(state, DynamicScope(None), self.f["function name"], {arguments...})`.