Skip to content

Commit

Permalink
Added implicit return to TraceAll
Browse files Browse the repository at this point in the history
  • Loading branch information
AryazE committed Dec 11, 2023
1 parent eda6095 commit 66d4eb9
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/dynapyt/analyses/TraceAll.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,32 @@ def _yield(
"""
self.log(iid, " Yielding", value)

def implicit_return(
self, dyn_ast: str, iid: int, function_iid: int, function_name: str, value: Any
) -> Any:
"""Hook for exiting a function without a return or yield (by reaching the end of function body).
Parameters
----------
dyn_ast : str
The path to the original code. Can be used to extract the syntax tree.
iid: int
ID unique to the current file, referring to the function definition.
function_iid: int
ID unique to the current file, referring to the function definition.
function_name: str
Name of the function exiting.
value : Any
The value returned (None).
"""
self.log(iid, " Exiting function")

# Function Call

def pre_call(
Expand Down

0 comments on commit 66d4eb9

Please sign in to comment.