mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Use frozenset more consistently
This commit is contained in:
parent
d9938f1a37
commit
4fd4bf71aa
6 changed files with 23 additions and 23 deletions
|
@ -221,19 +221,19 @@ class EInternal(Exception):
|
|||
pass
|
||||
|
||||
class parser(object):
|
||||
assignment_toks = frozenset(('=', '+=', '-=', '*=', '/=', '%='))
|
||||
extassignment_toks = frozenset(('|=', '&=', '^=', '<<=', '>>='))
|
||||
assignment_toks = frozenset({'=', '+=', '-=', '*=', '/=', '%='})
|
||||
extassignment_toks = frozenset({'|=', '&=', '^=', '<<=', '>>='})
|
||||
|
||||
double_toks = frozenset(('++', '--', '+=', '-=', '*=', '/=', '%=', '==',
|
||||
'!=', '>=', '<=', '&&', '||', '<<', '>>'))
|
||||
extdouble_toks = frozenset(('|=', '&=', '^='))
|
||||
double_toks = frozenset({'++', '--', '+=', '-=', '*=', '/=', '%=', '==',
|
||||
'!=', '>=', '<=', '&&', '||', '<<', '>>'})
|
||||
extdouble_toks = frozenset({'|=', '&=', '^='})
|
||||
|
||||
# These are hardcoded because additions or modifications imply
|
||||
# important changes to the code anyway.
|
||||
base_keywords = frozenset(('default', 'state', 'event', 'jump', 'return',
|
||||
'if', 'else', 'for', 'do', 'while', 'print', 'TRUE', 'FALSE'))
|
||||
brkcont_keywords = frozenset(('break', 'continue'))
|
||||
switch_keywords = frozenset(('switch', 'case', 'break', 'default'))
|
||||
base_keywords = frozenset({'default', 'state', 'event', 'jump', 'return',
|
||||
'if', 'else', 'for', 'do', 'while', 'print', 'TRUE', 'FALSE'})
|
||||
brkcont_keywords = frozenset({'break', 'continue'})
|
||||
switch_keywords = frozenset({'switch', 'case', 'break', 'default'})
|
||||
|
||||
PythonType2LSLToken = {int:'INTEGER_VALUE', float:'FLOAT_VALUE',
|
||||
unicode:'STRING_VALUE', Key:'KEY_VALUE', Vector:'VECTOR_VALUE',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue