Iterate Arguments Finished State Rule

When the state is "iterate_args" and the "Arguments" stack is empty, then the "Expression State" is updated to "call_function_begin."

if the following are true:
  • expression state at time t = "iterate_args"
  • arguments stack at time t = [ [ ], z ]
  • parent stack at time t = [ x, y ]

then expression state at time (t + 1) = "call_function_begin"

Argument iteration is finished, and entering the "call_function_begin" state signals that LW Python should evaluate the parent expression.

For example, if the following are true:

  • expression state at time 9 = "iterate_args"
  • arguments stack at time 9 = [ [ ], [ ] ]
  • parent stack at time 9 = [ add_three(a), [ ] ]

then expression state at time (9 + 1) = "call_function_begin"

Try stepping through the simulator to see the "Expression State" change to "call_function_begin."

Code Editor
LW Python State
Current Line1Current Tab0Time0
LW Python Simulator

Comments

Please log in to add comments