mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Separate library function optimization into a different file.
No other functional changes. This required quite some reorganization affecting many files. As a side effect, PythonType2LSL and LSLType2Python aren't duplicate anymore.
This commit is contained in:
parent
36947b7b12
commit
6738615360
5 changed files with 359 additions and 329 deletions
|
@ -199,10 +199,6 @@ class parser(object):
|
|||
switch_keywords = frozenset(('switch', 'case', 'break', 'default'))
|
||||
types = frozenset(('integer','float','string','key','vector',
|
||||
'quaternion','rotation','list'))
|
||||
PythonType2LSL = {int: 'integer', float: 'float',
|
||||
unicode: 'string', Key: 'key', Vector: 'vector',
|
||||
Quaternion: 'rotation', list: 'list'}
|
||||
|
||||
PythonType2LSLToken = {int:'INTEGER_VALUE', float:'FLOAT_VALUE',
|
||||
unicode:'STRING_VALUE', Key:'KEY_VALUE', Vector:'VECTOR_VALUE',
|
||||
Quaternion:'ROTATION_VALUE', list:'LIST_VALUE'}
|
||||
|
@ -2069,7 +2065,8 @@ list lazy_list_set(list L, integer i, list v)
|
|||
while self.tok[0] == 'STRING_VALUE':
|
||||
val += self.tok[1]
|
||||
self.NextToken()
|
||||
return {'nt':'CONST', 't':self.PythonType2LSL[type(val)], 'value':val}
|
||||
return {'nt':'CONST', 't':lslcommon.PythonType2LSL[type(val)],
|
||||
'value':val}
|
||||
if tok[0] == 'IDENT':
|
||||
sym = self.FindSymbolPartial(tok[1])
|
||||
if sym is None or sym['Kind'] != 'v':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue