mirror of https://github.com/aamine/cbc
28 lines
630 B
Java
28 lines
630 B
Java
package net.loveruby.cflat.ast;
|
|
import net.loveruby.cflat.type.*;
|
|
import java.util.*;
|
|
|
|
public class StructNode extends CompositeTypeDefinition {
|
|
public StructNode(Location loc, TypeRef ref, String name, List<Slot> membs) {
|
|
super(loc, ref, name, membs);
|
|
}
|
|
|
|
public String kind() {
|
|
return "struct";
|
|
}
|
|
|
|
public boolean isStruct() {
|
|
return true;
|
|
}
|
|
|
|
// #@@range/definingType{
|
|
public Type definingType() {
|
|
return new StructType(name(), members(), location());
|
|
}
|
|
// #@@}
|
|
|
|
public StructNode accept(ASTVisitor visitor) {
|
|
return visitor.visit(this);
|
|
}
|
|
}
|