Package net.hydromatic.morel.compile
Class NameGenerator
java.lang.Object
net.hydromatic.morel.compile.NameGenerator
Generates unique names.
Also keeps track of how many times each given name has been used in this program, so that a new occurrence of a name can be given a fresh ordinal.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
id
private int id -
nameCounts
-
-
Constructor Details
-
NameGenerator
public NameGenerator()
-
-
Method Details
-
get
Generates a name that is unique in this program. -
inc
Returns the number of times that "name" has been used for a variable.
-