p5.js-editor icon indicating copy to clipboard operation
p5.js-editor copied to clipboard

Syntax parser thinks for loop scope variables are already defined.

Open Crayder opened this issue 9 years ago • 0 comments

Basically, for loop local scopes are considered to be part of the scope the for loop is in.

image image

Even in https://github.com/processing/p5.js-editor/blob/84dad397bd38781623f425c82ab57d06746aad38/public/mode_assets/p5/examples/Simulate/10_SoftBody.js where the for loops all use i, the p5 editor thinks the variables are already defined even though they are not in the same scope.

Crayder avatar Jan 13 '17 17:01 Crayder