mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Initial commit. Status so far:
- Parser and output modules are thoroughly tested and working. - Most LSL immutable functions are working; some not tested; llJsonSetValue not implemented. - Parser recognizes the following flags that alter syntax: extendedglobalexpr: Allow full expression syntax in globals. extendedtypecast: Allow full unary expressions in typecasts e.g. (float)~i. extendedassignment: Enable the C assignment operators &=, ^=, |=, <<=, >>=. explicitcast: Add explicit casts wherever they are done implicitly, e.g. float f=3; -> float f=(float)3;. Of them, only extendedglobalexpr is useless so far, as it requires the optimizer to be working.
This commit is contained in:
commit
05d00e075b
8 changed files with 4390 additions and 0 deletions
19
lslopt/lslcommon.py
Normal file
19
lslopt/lslcommon.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# These types just wrap the Python types to make type() work on them.
|
||||
# There are no ops defined on them or anything.
|
||||
|
||||
class Key(unicode):
|
||||
def __repr__(self):
|
||||
return self.__class__.__name__ + '(' + super(self.__class__, self).__repr__() + ')'
|
||||
|
||||
class Vector(tuple):
|
||||
def __repr__(self):
|
||||
return self.__class__.__name__ + '(' + super(self.__class__, self).__repr__() + ')'
|
||||
|
||||
class Quaternion(tuple):
|
||||
def __repr__(self):
|
||||
return self.__class__.__name__ + '(' + super(self.__class__, self).__repr__() + ')'
|
||||
|
||||
# Recognized: 3763, 6466, 6495
|
||||
Bugs = set([6495])
|
||||
|
||||
LSO = False
|
Loading…
Add table
Add a link
Reference in a new issue