nielsAD / lape

Scripting engine with Pascal-like syntax for FPC and Delphi
112 stars 26 forks source link

Remove TreeMethodMap & Fix misplaced `setReadWrite` in ParseMethod #184

Closed ollydev closed 1 year ago

ollydev commented 1 year ago

1) Removed the compilers TreeMethodMap which is used for script method overriding. For such a small amount of usage it's not needed, rather the delayed tree is just looped. This also fixes a bug where overriding a script method that was "imported" such as with addDelayedCode and inherited was a invalid value because TreeMethodMap was cleared before script compile.

2) Method.setReadWrite(False, False) in ParseMethod was misplaced where it might not be applied on a newly created method.