Implementation details can be found in the README of services/executor. (TL;DR splits variable_changes field into local_variable_changes and global_variable_changes, and adds a function_scope field).
Tested by adding testcases to executor service. Frontend can be tested here.
Note that the frontend simply merges the local_variable_changes and global_variable_changes for now, which can lead to bugs like this. This is something to keep in mind when we implement the frontend part of this feature.
(since a in the f1 scope is not modified in the last line, we end up with a = 2 instead of a = 1 being displayed)
This PR implements this feature on the backend.
Implementation details can be found in the README of services/executor. (TL;DR splits
variable_changes
field intolocal_variable_changes
andglobal_variable_changes
, and adds afunction_scope
field).Tested by adding testcases to executor service. Frontend can be tested here.
Note that the frontend simply merges the
local_variable_changes
andglobal_variable_changes
for now, which can lead to bugs like this. This is something to keep in mind when we implement the frontend part of this feature. (sincea
in thef1
scope is not modified in the last line, we end up witha = 2
instead ofa = 1
being displayed)