public virtual void VisitQueryLetClause(QueryLetClause queryLetClause) { if (ThrowException) { throw (Exception)CreateException(queryLetClause); } }
public virtual void VisitQueryLetClause(QueryLetClause queryLetClause) { if (this.ThrowException) { throw (System.Exception) this.CreateException(queryLetClause); } }
public UnifiedElement VisitQueryLetClause( QueryLetClause let, object data) { var ident = UnifiedIdentifier.CreateVariable(let.Identifier); var expr = let.Expression.TryAcceptForExpression(this); return(UnifiedLetQuery.Create(ident, expr)); }
public override object VisitQueryLetClause(QueryLetClause queryExpressionLetClause, object data) { var generateExpression = GenerateExpression(queryExpressionLetClause.Expression); if (generateExpression != null) { aliasToName[queryExpressionLetClause.Identifier] = generateExpression + "."; } return(base.VisitQueryLetClause(queryExpressionLetClause, data)); }
public override object VisitQueryLetClause(QueryLetClause queryLetClause, object data) { if (SimplifyLetExpression(queryLetClause.Expression) is LambdaExpression) { var text = QueryParsingUtils.ToText(queryLetClause); throw new SecurityException("Let expression cannot contain labmda expressions, but got: " + text); } return(base.VisitQueryLetClause(queryLetClause, data)); }
bool TryRemoveTransparentIdentifier(QueryExpression query, QueryFromClause fromClause, QueryExpression innerQuery, Dictionary <string, object> letClauses) { if (!IsTransparentIdentifier(fromClause.Identifier)) { return(false); } QuerySelectClause selectClause = innerQuery.Clauses.Last() as QuerySelectClause; Match match = selectTransparentIdentifierPattern.Match(selectClause); if (!match.Success) { return(false); } // from * in (from x in ... select new { members of anonymous type }) ... // => // from x in ... { let x = ... } ... fromClause.Remove(); selectClause.Remove(); // Move clauses from innerQuery to query QueryClause insertionPos = null; foreach (var clause in innerQuery.Clauses) { query.Clauses.InsertAfter(insertionPos, insertionPos = clause.Detach()); } foreach (var expr in match.Get <Expression>("expr")) { switch (expr) { case IdentifierExpression identifier: // nothing to add continue; case NamedExpression namedExpression: if (namedExpression.Expression is IdentifierExpression identifierExpression && namedExpression.Name == identifierExpression.Identifier) { letClauses[namedExpression.Name] = identifierExpression.Annotation <ILVariableResolveResult>(); continue; } QueryLetClause letClause = new QueryLetClause { Identifier = namedExpression.Name, Expression = namedExpression.Expression.Detach() }; var annotation = new LetIdentifierAnnotation(); letClause.AddAnnotation(annotation); letClauses[namedExpression.Name] = annotation; query.Clauses.InsertAfter(insertionPos, letClause); break; } } return(true); }
public override object Visit (Mono.CSharp.Linq.Let l) { var result = new QueryLetClause (); var location = LocationsBag.GetLocations (l); result.AddChild (new CSharpTokenNode (Convert (l.Location), "let".Length), QueryLetClause.Roles.Keyword); result.AddChild (new Identifier (l.IntoVariable.Name, Convert (l.IntoVariable.Location)), Identifier.Roles.Identifier); if (location != null) result.AddChild (new CSharpTokenNode (Convert (location [0]), 1), QueryLetClause.Roles.Assign); result.AddChild ((Expression)l.Expr.Accept (this), QueryLetClause.Roles.Expression); return result; }
public StringBuilder VisitQueryLetClause(QueryLetClause queryLetClause, int data) { throw new ASLException("ASL does not understand LINQ."); }
public override object Visit (Mono.CSharp.Linq.Let l) { var result = new QueryLetClause (); var location = LocationsBag.GetLocations (l); if (location != null) result.AddChild (new CSharpTokenNode (Convert (location[0]), "let".Length), QueryWhereClause.Roles.Keyword); NewAnonymousType aType = l.Expr as NewAnonymousType; AnonymousTypeParameter param = ((AnonymousTypeParameter)aType.Parameters[1]); result.AddChild (new Identifier (param.Name, Convert (param.Location)), Identifier.Roles.Identifier); if (location != null) result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), QueryWhereClause.Roles.Assign); result.AddChild ((MonoDevelop.CSharp.Ast.Expression)param.Expr.Accept (this), QueryWhereClause.Roles.Condition); return result; }
public void VisitQueryLetClause(QueryLetClause queryLetClause) { throw new NotImplementedException(); }
public JNode VisitQueryLetClause(QueryLetClause node) { throw new NotImplementedException(); }
public StringBuilder VisitQueryLetClause(QueryLetClause queryLetClause, int data) { throw new SLSharpException("SL# does not understand LINQ."); }
public override void VisitQueryLetClause(QueryLetClause queryLetClause) { base.VisitQueryLetClause(queryLetClause); indexData.HasLet = true; }
public void VisitQueryLetClause(QueryLetClause node) { NotSupported(node); }
public virtual S VisitQueryLetClause(QueryLetClause queryLetClause, T data) { return(VisitChildren(queryLetClause, data)); }
public override void VisitQueryLetClause(QueryLetClause queryLetClause) { FixClauseIndentation(queryLetClause, queryLetClause.LetKeyword); }
public virtual void VisitQueryLetClause(QueryLetClause queryLetClause) { DebugExpression(queryLetClause); StartNode(queryLetClause); WriteKeyword(QueryLetClause.LetKeywordRole); Space(); WriteIdentifier(queryLetClause.IdentifierToken); Space(policy.SpaceAroundAssignment); WriteToken(Roles.Assign, BoxedTextColor.Operator); Space(policy.SpaceAroundAssignment); queryLetClause.Expression.AcceptVisitor(this); EndNode(queryLetClause); }
public StringBuilder VisitQueryLetClause(QueryLetClause queryLetClause) { return(InvalidNode(queryLetClause, "LINQ is not supported")); }
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) { QueryLetClause o = other as QueryLetClause; return(o != null && MatchString(this.Identifier, o.Identifier) && this.Expression.DoMatch(o.Expression, match)); }
public override void VisitQueryLetClause(QueryLetClause queryLetClause) { throw NotSupportedToConsistency(); }
public override void VisitQueryLetClause(QueryLetClause queryLetClause) { ProcessName(queryLetClause.Identifier); base.VisitQueryLetClause(queryLetClause); }
/// <inheritdoc/> public virtual void VisitQueryLetClause(QueryLetClause syntax) { VisitNode(syntax); }
public virtual void VisitQueryLetClause(QueryLetClause queryLetClause) { VisitChildren (queryLetClause); }
public override void VisitQueryLetClause(QueryLetClause queryLetClause) { }
public RedILNode VisitQueryLetClause(QueryLetClause queryLetClause, State data) { throw new System.NotImplementedException(); }
public override void VisitQueryLetClause(QueryLetClause syntax) { _underlyingVisitor.VisitQueryLetClause(syntax); }
public Node VisitQueryLetClause(QueryLetClause queryLetClause) { return(CreateDummy(queryLetClause)); }
public virtual void VisitQueryLetClause(QueryLetClause queryLetClause) { if (this.ThrowException) { throw (Exception)this.CreateException(queryLetClause); } }
public override object Visit(Mono.CSharp.Linq.Let let) { var result = new QueryLetClause(); var location = LocationsBag.GetLocations(let); result.AddChild(new CSharpTokenNode(Convert(let.Location), QueryLetClause.LetKeywordRole), QueryLetClause.LetKeywordRole); result.AddChild(Identifier.Create(let.IntoVariable.Name, Convert(let.IntoVariable.Location)), Roles.Identifier); if (location != null) result.AddChild(new CSharpTokenNode(Convert(location [0]), Roles.Assign), Roles.Assign); if (let.Expr != null) result.AddChild((Expression)let.Expr.Accept(this), Roles.Expression); return result; }
public void VisitQueryLetClause(QueryLetClause queryLetClause) { StartNode(queryLetClause); WriteKeyword(QueryLetClause.LetKeywordRole); Space(); queryLetClause.IdentifierToken.AcceptVisitor(this); Space(policy.SpaceAroundAssignment); WriteToken(Roles.Assign); Space(policy.SpaceAroundAssignment); queryLetClause.Expression.AcceptVisitor(this); EndNode(queryLetClause); }
public virtual Node VisitQueryLetClause(QueryLetClause queryLetClause) { throw new System.NotImplementedException(); }