// Record Aggregates public int VisitMultipleRecordAggregate(MultipleRecordAggregate ast, Frame frame) { var fieldSize = ast.Expression.Visit(this, frame); var frame1 = frame.Expand(fieldSize); var recordSize = ast.RecordAggregate.Visit(this, frame1); return(fieldSize + recordSize); }
public FieldTypeDenoter VisitMultipleRecordAggregate(MultipleRecordAggregate ast, Void arg) { var expressionType = ast.Expression.Visit(this); var recordType = ast.RecordAggregate.Visit(this); var fieldType = CheckFieldIdentifier(recordType, ast.Identifier); CheckAndReportError(fieldType == StandardEnvironment.ErrorType, "duplicate field \"%\" in record", ast.Identifier); return(ast.Type = new MultipleFieldTypeDenoter(ast.Identifier, expressionType, recordType, ast.Position)); }