Open totalgee opened 7 months ago
This was implemented (for /def
and /routine
) in b48222a3. I added an inner class CommandDescription.Flags
to be used to make initialization of commands more explicit (it was confusing to have three bools in a row!).
We need to add a flag so that certain commands (namely
/def
,/routine
,/for
-- and possibly future/if
,/else
and related conditionals) will not evaluate expressions (described by{expr}
) or variables (described by$var
). These evaluations need to be deferred, so that variables such astime
or random numbers are evaluated at the "last moment", just before actually being executed. In the case of/def
and/routine
, these commands are only storing a list of commands to be evaluated later.We currently have
argsAsArray
andtoGdScript
flags, so we should just add another one,evalExpressions
.