Begin Expression Parent Rule
If Python is in the "begin_expr" state and "Expression" is a function call, then copy "Expression" (function call) to the "Parents" stack. Later, when "Expression" is updated to the child expressions, LW Python does not lose the parent expression since it is saved in "Parents."
if the following are true:
- expression state at time t = "begin_expr"
- the expression at time t = function call with name: name and arguments: args
then parent stack at time (t + 1) = [ function call with name: name and arguments: args, parent stack at time t ]
if the following are true:
- expression state at time 1 = "begin_expr"
- the expression at time 1 =
__add__(5, 2)
then parent stack at time (1 + 1) = [ __add__(5, 2)
, parent stack at time 2 ]
Code Editor
LW Python State
Current Line | 1 | Current Tab | 0 | Time | 0 |
LW Python Simulator
Comments
Please log in to add comments