public Join (QueryBlock block, RangeVariable lt, Expression inner, QueryBlock outerSelector, QueryBlock innerSelector, Location loc) : base (block, lt, inner, loc) { this.outer_selector = outerSelector; this.inner_selector = innerSelector; }
public GroupJoin (QueryBlock block, RangeVariable lt, Expression inner, QueryBlock outerSelector, QueryBlock innerSelector, RangeVariable into, Location loc) : base (block, lt, inner, outerSelector, innerSelector, loc) { this.into = into; }
protected ARangeVariableQueryClause(QueryBlock block, RangeVariable identifier, Expression expr, Location loc) : base(block, expr, loc) { this.identifier = identifier; }
public QueryStartClause (QueryBlock block, Expression expr, RangeVariable identifier, Location loc) : base (block, identifier, expr, loc) { block.AddRangeVariable (identifier); }
void case_1033() #line 6960 "cs-parser.jay" { var lt = (LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); yyVal = new Linq.SelectMany ((Linq.QueryBlock)current_block, sn, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-5+yyTop])) { IdentifierType = (FullNamedExpression)yyVals[-4+yyTop] }; current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; ((Linq.QueryBlock)current_block).AddRangeVariable (sn); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); }
void case_1060() #line 7145 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); var outer_selector = linq_clause_blocks.Pop (); var block = linq_clause_blocks.Pop (); var lt = (LocatedToken) yyVals[-10+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); Linq.RangeVariable into; if (yyVals[0+yyTop] == null) { into = sn; yyVal = new Linq.Join (block, sn, (Expression)yyVals[-7+yyTop], outer_selector, (Linq.QueryBlock) current_block, GetLocation (yyVals[-11+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-3+yyTop])); } else { /**/ /* Set equals right side parent to beginning of linq query, it is not accessible therefore cannot cause name collisions*/ /**/ var parent = block.Parent; while (parent is Linq.QueryBlock) { parent = parent.Parent; } current_block.Parent = parent; ((Linq.QueryBlock)current_block).AddRangeVariable (sn); lt = (LocatedToken) yyVals[0+yyTop]; into = new Linq.RangeVariable (lt.Value, lt.Location); yyVal = new Linq.GroupJoin (block, sn, (Expression)yyVals[-7+yyTop], outer_selector, (Linq.QueryBlock) current_block, into, GetLocation (yyVals[-11+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-3+yyTop]), opt_intoStack.Pop ()); } current_block = block.Parent; ((Linq.QueryBlock)current_block).AddRangeVariable (into); } void case_1061() #line 7183 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack<Linq.QueryBlock> (); current_block = new Linq.QueryBlock (current_block, lexer.Location); linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } void case_1062() #line 7191 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; current_block = new Linq.QueryBlock (current_block, lexer.Location); linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } void case_1063() #line 7199 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; current_block = new Linq.QueryBlock (current_block, lexer.Location); } void case_1064() #line 7207 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); var outer_selector = linq_clause_blocks.Pop (); var block = linq_clause_blocks.Pop (); var lt = (LocatedToken) yyVals[-10+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); Linq.RangeVariable into; if (yyVals[0+yyTop] == null) { into = sn; yyVal = new Linq.Join (block, sn, (Expression)yyVals[-7+yyTop], outer_selector, (Linq.QueryBlock) current_block, GetLocation (yyVals[-12+yyTop])) { IdentifierType = (FullNamedExpression)yyVals[-11+yyTop] }; lbag.AddLocation (yyVal, GetLocation (yyVals[-10+yyTop]), GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-4+yyTop])); } else { /**/ /* Set equals right side parent to beginning of linq query, it is not accessible therefore cannot cause name collisions*/ /**/ var parent = block.Parent; while (parent is Linq.QueryBlock) { parent = parent.Parent; } current_block.Parent = parent; ((Linq.QueryBlock)current_block).AddRangeVariable (sn); lt = (LocatedToken) yyVals[0+yyTop]; into = new Linq.RangeVariable (lt.Value, lt.Location); /* TODO:*/ yyVal = new Linq.GroupJoin (block, sn, (Expression)yyVals[-7+yyTop], outer_selector, (Linq.QueryBlock) current_block, into, GetLocation (yyVals[-12+yyTop])) { IdentifierType = (FullNamedExpression)yyVals[-11+yyTop] }; lbag.AddLocation (yyVal, GetLocation (yyVals[-10+yyTop]), GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-4+yyTop]), opt_intoStack.Pop ()); } current_block = block.Parent; ((Linq.QueryBlock)current_block).AddRangeVariable (into); }
public TransparentParameter(Parameter parent, RangeVariable identifier) : base(ParameterNamePrefix + Counter++, identifier.Location) { Parent = parent; Identifier = identifier.Name; }
public void AddRangeVariable (RangeVariable variable) { variable.Block = this; TopBlock.AddLocalName (variable.Name, variable, true); }
public GroupJoin(QueryBlock block, RangeVariable lt, Expression inner, QueryBlock outerSelector, QueryBlock innerSelector, RangeVariable into, Location loc) : base(block, lt, inner, outerSelector, innerSelector, loc) { this.into = into; }
public SelectMany(QueryBlock block, RangeVariable identifier, Expression expr, Location loc) : base(block, identifier, expr, loc) { }
public Join(QueryBlock block, RangeVariable lt, Expression inner, QueryBlock outerSelector, QueryBlock innerSelector, Location loc) : base(block, lt, inner, loc) { this.outer_selector = outerSelector; this.inner_selector = innerSelector; }
public QueryStartClause(QueryBlock block, Expression expr, RangeVariable identifier, Location loc) : base(block, identifier, expr, loc) { block.AddRangeVariable(identifier); }
protected static Expression CreateRangeVariableType(ResolveContext rc, Parameter parameter, RangeVariable name, Expression init) { var args = new List <AnonymousTypeParameter> (2); // // The first argument is the reference to the parameter // args.Add(new AnonymousTypeParameter(new RangeParameterReference(parameter), parameter.Name, parameter.Location)); // // The second argument is the linq expression // args.Add(new RangeAnonymousTypeParameter(init, name)); // // Create unique anonymous type // return(new NewAnonymousType(args, rc.MemberContext.CurrentMemberDefinition.Parent, name.Location)); }
public SelectMany (QueryBlock block, RangeVariable identifier, Expression expr, Location loc) : base (block, identifier, expr, loc) { }
public void AddRangeVariable(RangeVariable variable) { variable.Block = this; TopBlock.AddLocalName(variable.Name, variable, true); }
public TransparentParameter (Parameter parent, RangeVariable identifier) : base (ParameterNamePrefix + Counter++, identifier.Location) { Parent = parent; Identifier = identifier.Name; }
public RangeAnonymousTypeParameter (Expression initializer, RangeVariable parameter) : base (initializer, parameter.Name, parameter.Location) { }
void case_1029() #line 6926 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); var lt = (LocatedToken) yyVals[-2+yyTop]; var rv = new Linq.RangeVariable (lt.Value, lt.Location); var clause = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-4+yyTop])) { IdentifierType = (FullNamedExpression)yyVals[-3+yyTop] }; lbag.AddLocation (clause, GetLocation (yyVals[-1+yyTop])); yyVal = new Linq.QueryExpression (clause); }
protected ARangeVariableQueryClause (QueryBlock block, RangeVariable identifier, Expression expr, Location loc) : base (block, expr, loc) { this.identifier = identifier; }
void case_1054() #line 7092 "cs-parser.jay" { var lt = (LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); yyVal = new Linq.Let ((Linq.QueryBlock) current_block, sn, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; ((Linq.QueryBlock)current_block).AddRangeVariable (sn); }
protected static Expression CreateRangeVariableType (ResolveContext rc, Parameter parameter, RangeVariable name, Expression init) { var args = new List<AnonymousTypeParameter> (2); // // The first argument is the reference to the parameter // args.Add (new AnonymousTypeParameter (new RangeParameterReference (parameter), parameter.Name, parameter.Location)); // // The second argument is the linq expression // args.Add (new RangeAnonymousTypeParameter (init, name)); // // Create unique anonymous type // return new NewAnonymousType (args, rc.MemberContext.CurrentMemberDefinition.Parent, name.Location); }
void case_1083() #line 7360 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (LocatedToken) yyVals[-2+yyTop]; var rv = new Linq.RangeVariable (lt.Value, lt.Location); yyVal = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, null, rv, GetLocation (yyVals[-3+yyTop])) { next = (Linq.AQueryClause)yyVals[0+yyTop] }; }
public RangeAnonymousTypeParameter(Expression initializer, RangeVariable parameter) : base(initializer, parameter.Name, parameter.Location) { }