public virtual void Visit(WOrderByClause node) { node.AcceptChildren(this); }
private WOrderByClause ParseOrderbyClause(OrderByClause orderbyExpr) { var wobc = new WOrderByClause { FirstTokenIndex = orderbyExpr.FirstTokenIndex, LastTokenIndex = orderbyExpr.LastTokenIndex, OrderByElements = new List<WExpressionWithSortOrder>(orderbyExpr.OrderByElements.Count) }; foreach (var pexp in from e in orderbyExpr.OrderByElements let pscalar = ParseScalarExpression(e.Expression) where pscalar != null select new WExpressionWithSortOrder { ScalarExpr = pscalar, SortOrder = e.SortOrder, FirstTokenIndex = e.FirstTokenIndex, LastTokenIndex = e.LastTokenIndex }) { wobc.OrderByElements.Add(pexp); } return wobc; }