Enums: Make EnumDefinition use EnumValues instead of Strings as children.
This allows us to store the index of the enum value along the name. The index can be used to compare two enum values in assembler. Later on this might be used to enable users of KLang to set arbitrary values as the index of an enum value.
This commit is contained in:
@@ -5,9 +5,9 @@ import de.hsrm.compiler.Klang.visitors.Visitor;
|
||||
public class EnumDefinition extends Node {
|
||||
|
||||
public String name;
|
||||
public String[] enums;
|
||||
public EnumValue[] enums;
|
||||
|
||||
public EnumDefinition(String name, String[] enums) {
|
||||
public EnumDefinition(String name, EnumValue[] enums) {
|
||||
this.name = name;
|
||||
this.enums = enums;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user