Source source ) {
DynamicOperand operand = parseDynamicOperand(tokens, typeSystem, source);
Order order = Order.ASCENDING;
if (tokens.canConsume("DESC")) order = Order.DESCENDING;
if (tokens.canConsume("ASC")) order = Order.ASCENDING;
NullOrder nullOrder = NullOrder.defaultOrder(order);
if (tokens.canConsume("NULLS", "FIRST")) nullOrder = NullOrder.NULLS_FIRST;
if (tokens.canConsume("NULLS", "LAST")) nullOrder = NullOrder.NULLS_LAST;
return ordering(operand, order, nullOrder);
}