mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-03 00:18:20 +00:00
'case' needed to be in the list of 4-char words to avoid. Also tweak a comment.
This commit is contained in:
parent
cbcf60767a
commit
7fb345b222
1 changed files with 3 additions and 4 deletions
|
@ -6,7 +6,7 @@ class renamer(object):
|
||||||
CharSet2 = '0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
CharSet2 = '0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
||||||
# TODO: Derive these from builtins.txt somehow.
|
# TODO: Derive these from builtins.txt somehow.
|
||||||
KwByLen = ((), (), ('do', 'if', 'PI'), ('for', 'key', 'EOF'),
|
KwByLen = ((), (), ('do', 'if', 'PI'), ('for', 'key', 'EOF'),
|
||||||
('jump', 'else', 'list', 'TRUE', 'LOOP'))
|
('jump', 'else', 'list', 'TRUE', 'LOOP', 'case'))
|
||||||
def GetNextShortest(self):
|
def GetNextShortest(self):
|
||||||
"""Generate the next shortest possible identifier"""
|
"""Generate the next shortest possible identifier"""
|
||||||
while True:
|
while True:
|
||||||
|
@ -33,9 +33,8 @@ class renamer(object):
|
||||||
self.WordRestOfChars = []
|
self.WordRestOfChars = []
|
||||||
|
|
||||||
# Names that can be reused without penalty. The initial set is there
|
# Names that can be reused without penalty. The initial set is there
|
||||||
# since the beginning. Others (e.g. Key) are created when certain
|
# since the beginning. Others are created depending on the code
|
||||||
# stuff is present (e.g. Key when there are keys), but we don't take
|
# (e.g. Key when there are keys), but we don't take too many risks.
|
||||||
# too many risks.
|
|
||||||
ReusableNames = set(['LslLibrary', 'LslUserScript', 'System'])
|
ReusableNames = set(['LslLibrary', 'LslUserScript', 'System'])
|
||||||
|
|
||||||
# Names from ReusableNames that have already been used
|
# Names from ReusableNames that have already been used
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue