Open rksm opened 7 years ago
When using a definition wrapping function via lively.ast.capturing.rewriteToCaptureTopLevelVariables(..., {declarationWrapper: astForDeclFunc}) then simple assignments are correctly wrapped:
lively.ast.capturing.rewriteToCaptureTopLevelVariables(..., {declarationWrapper: astForDeclFunc})
i = i+1 becomes _rec.i = _rec._define('i', 'assignment', _rec.i + 1, _rec);
i = i+1
_rec.i = _rec._define('i', 'assignment', _rec.i + 1, _rec);
However, expressions like i++ or i+=1 aren't correctly identified as modifications and not wrapped.
i++
i+=1
Fix that!
When using a definition wrapping function via
lively.ast.capturing.rewriteToCaptureTopLevelVariables(..., {declarationWrapper: astForDeclFunc})
then simple assignments are correctly wrapped:i = i+1
becomes_rec.i = _rec._define('i', 'assignment', _rec.i + 1, _rec);
However, expressions like
i++
ori+=1
aren't correctly identified as modifications and not wrapped.Fix that!