IronBlock icon indicating copy to clipboard operation
IronBlock copied to clipboard

Differences between Generate and Evaluate

Open maciejmatuszak opened this issue 4 years ago • 1 comments

@richorama Hi Richard, I had bit more time and started to look at the implementation of the tickets I put some time ago. One thing I notice there is Generate is creating subContext for block operations like "if", "while" or "procedure call". Is there reason why Evaluate is not doing it?

maciejmatuszak avatar Jun 07 '21 11:06 maciejmatuszak

excellent observation!

I wrote the 'Evaluate' implementation to follow how I thought the blockly implementation works (i.e. variables can be used outside of their scopes).

The 'Generate' method was contributed.

I'll check to see which approach is correct.

richorama avatar Jun 07 '21 14:06 richorama