From cd9bfd426e43c6134f65a83daee3c98d7f9958bc Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Sun, 26 Jul 2015 00:13:00 +0200 Subject: [PATCH] Update list of pre-allocated keywords. --- lslopt/lslrenamer.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lslopt/lslrenamer.py b/lslopt/lslrenamer.py index 9d5b136..67b0a8e 100644 --- a/lslopt/lslrenamer.py +++ b/lslopt/lslrenamer.py @@ -29,7 +29,7 @@ class renamer(object): CharSet1 = '_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' CharSet2 = '0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' # TODO: Derive these from builtins.txt somehow. - KwByLen = ((), (), ('do', 'if', 'PI'), ('for', 'key', 'EOF'), + KwByLen = ((), (), ('do', 'if', 'PI'), ('for', 'key', 'EOF', 'Pop'), ('jump', 'else', 'list', 'TRUE', 'LOOP', 'case')) def GetNextShortest(self): """Generate the next shortest possible identifier""" @@ -56,10 +56,13 @@ class renamer(object): self.WordFirstChar = 0 self.WordRestOfChars = [] - # Names that can be reused without penalty. The initial set is there + # Names that can be reused without penalty. This initial set is there # since the beginning. Others are created depending on the code # (e.g. Key when there are keys), but we don't take too many risks. - ReusableNames = set(['LslLibrary', 'LslUserScript', 'System']) + ReusableNames = set(['LslLibrary', 'Library', 'LslUserScript', + 'System', 'UThread', 'UThreadStackFrame', 'Pop', + 'IsRestoring', 'IsSaveDue', 'ResumeVoid', + ]) # Names from ReusableNames that have already been used self.UsedNames = set()