public AstTypedef SubType(string ident, AstType super) { var cols = new DataColumn[] { DataColumn.Create("super", super.DataType) }; var ut = DataTypeUser.Get(ident, cols); Symbols.AddUserType(ident, ut); return(new AstSubType { DataType = DataTypes.Void }); }
public AstTypedef UserType(string ident, AstField[] fields) { var ff = fields.Select(a => DataColumn.Create(a.Name, a.DataType)).ToArray(); var ut = DataTypeUser.Get(ident, ff); Symbols.AddUserType(ident, ut); Symbols.AddCatalog(Symbols.FindIdent(ident)); return(new AstUserType { DataType = DataTypes.Void }); }