public override object Visit (Mono.CSharp.Linq.SelectMany selectMany) { var result = new QueryExpressionFromClause (); // TODO: // Mono.CSharp.Linq.Cast cast = selectMany.Expr as Mono.CSharp.Linq.Cast; var location = LocationsBag.GetLocations (selectMany); if (location != null) result.AddChild (new CSharpTokenNode (Convert (location[0]), "from".Length), QueryExpressionFromClause.FromKeywordRole); // result.AddChild ((INode)cast.TypeExpr.Accept (this), QueryExpressionFromClause.Roles.ReturnType); // if (cast != null) // result.AddChild (new Identifier (selectMany.SelectIdentifier.Value, Convert (selectMany.SelectIdentifier.Location)), QueryExpressionFromClause.Roles.Identifier); // result.AddChild (new CSharpTokenNode (Convert (location[1]), "in".Length), QueryExpressionFromClause.InKeywordRole); // result.AddChild ((INode)(cast != null ? cast.Expr : selectMany.Expr).Accept (this), QueryExpressionFromClause.Roles.Expression); return result; }
public override object Visit (Mono.CSharp.Linq.QueryExpression queryExpression) { var result = new QueryExpressionFromClause (); var location = LocationsBag.GetLocations (queryExpression); if (location != null) result.AddChild (new CSharpTokenNode (Convert (location[0]), "from".Length), QueryExpressionFromClause.FromKeywordRole); // TODO: select identifier if (location != null) result.AddChild (new CSharpTokenNode (Convert (location[1]), "in".Length), QueryExpressionFromClause.InKeywordRole); result.AddChild ((INode)((Mono.CSharp.Linq.AQueryClause)queryExpression.Expr).Expr.Accept (this), QueryExpressionFromClause.Roles.Expression); return result; }