mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Implement function overriding syntax extension, fixing a bug on the way.
The funcoverride option allows defining multiple functions with the same name, each overriding the former. That's for compatibility with Firestorm, whose optimizer does that. While on it, fix a bug where defining a function whose name matches a library function was not reporting an error, and rename self.functions to self.funclibrary for clarity. It also brings consistency with other parts of the code and with the code documentation.
This commit is contained in:
parent
3839863a21
commit
921955f321
2 changed files with 39 additions and 15 deletions
3
main.py
3
main.py
|
@ -234,6 +234,9 @@ Optimizer options (+ means active by default, - means inactive by default):
|
|||
Like lazylists, it's implemented for compatibility with
|
||||
Firestorm, but not recommended. Note that the operand to
|
||||
switch() may be evaluated more than once.
|
||||
funcoverride - Allow duplicate function definitions to override the
|
||||
previous definition. For compatibility with Firestorm's
|
||||
optimizer.
|
||||
|
||||
Optimization options
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue