Call Function Begin State Rule
When the state is "call_function_begin" and "Expression" is not a built-in function, then the state is updated to "call_build_args"
if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ values, stack ]
- the expression at time t = function call with name: name and arguments: args
then expression state at time (t + 1) = "call_build_args"
For example,
if the following are true:
- expression state at time 10 = "call_function_begin"
- Value Stack at time 10 = [ [ 5, [ ] ], [ ] ]
- the expression at time 10 =
add_three(a)
then expression state at time (10 + 1) = "call_build_args"
Try stepping through the simulator to see LW Python change state from "call_function_begin" to "call_build_args."
Code Editor
LW Python State
Current Line | 1 | Current Tab | 0 | Time | 0 |
LW Python Simulator
Comments
Please log in to add comments