I checked in support for enums. My intention is to support a full syntax very similar to Java enums with special constructor support and constant-specific methods (http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html). For now I have basic support with the ability to add additional slots:
You can access the integer ordinal via the ordinal() method and the programmatic identifier via name(). Plus every enum will provide a static field called values with a list of it's range. The main method above illustrates iterating the values of the enum.
brianMon 17 Apr 2006
Actually, I finished up support for enum constructors since it was easy to implement and quite handy:
brian Mon 17 Apr 2006
I checked in support for enums. My intention is to support a full syntax very similar to Java enums with special constructor support and constant-specific methods (http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html). For now I have basic support with the ability to add additional slots:
You can access the integer ordinal via the ordinal() method and the programmatic identifier via name(). Plus every enum will provide a static field called values with a list of it's range. The main method above illustrates iterating the values of the enum.
brian Mon 17 Apr 2006
Actually, I finished up support for enum constructors since it was easy to implement and quite handy: