Remove old TODO and add new one.

Identifiers can be equal if they belong to different syntactic scopes. That will allow better reuse and less creation of new identifiers, most notably as function and event parameter names.

The implementation would require a stack of counters where the current value is pushed when entering a new scope, and popped when exiting, rather than using a single counter for the whole program.
This commit is contained in:
Sei Lisa 2015-12-09 05:06:21 +01:00
parent 055663b79d
commit 91201f1e30

View file

@ -23,7 +23,7 @@
# #
# A side effect of this change is that the script becomes unreadable gibberish. # A side effect of this change is that the script becomes unreadable gibberish.
# TODO: Rename locals to loc_<identifier> rather than random names. # TODO: Make a new counter per scope.
class renamer(object): class renamer(object):
CharSet1 = '_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' CharSet1 = '_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'