/** * Run type checks on the attributes; expression must return a string which we will use as a sort * key */ public Type typeCheck(SymbolTable stable) throws TypeCheckError { final Type tselect = _select.typeCheck(stable); // If the sort data-type is not set we use the natural data-type // of the data we will sort if (!(tselect instanceof StringType)) { _select = new CastExpr(_select, Type.String); } _order.typeCheck(stable); _caseOrder.typeCheck(stable); _dataType.typeCheck(stable); return Type.Void; }
public Type typeCheck(SymbolTable stable) throws TypeCheckError { _name.typeCheck(stable); typeCheckContents(stable); return Type.Void; }