public virtual void Visit(WGroupByClause node) { node.AcceptChildren(this); }
private WGroupByClause ParseGroupbyClause(GroupByClause groupbyExpr) { if (groupbyExpr == null) { return null; } var wgc = new WGroupByClause { FirstTokenIndex = groupbyExpr.FirstTokenIndex, LastTokenIndex = groupbyExpr.LastTokenIndex, GroupingSpecifications = new List<WGroupingSpecification>(groupbyExpr.GroupingSpecifications.Count) }; foreach (var gs in groupbyExpr.GroupingSpecifications) { //if (!(gs is ExpressionGroupingSpecification)) // continue; var egs = gs as ExpressionGroupingSpecification; if (egs == null) continue; var pspec = new WExpressionGroupingSpec { Expression = ParseScalarExpression(egs.Expression), FirstTokenIndex = egs.FirstTokenIndex, LastTokenIndex = egs.LastTokenIndex, }; wgc.GroupingSpecifications.Add(pspec); } return wgc; }