public Join(ToplevelBlock block, LocatedToken lt, Expression inner, ToplevelBlock outerSelector, ToplevelBlock innerSelector, Location loc) : base(block, inner) { this.lt = lt; this.outer_selector = outerSelector; this.inner_selector = innerSelector; }
public QueryBlock(CompilerContext ctx, Block parent, LocatedToken lt, Location start) : base(ctx, parent, new ParametersCompiled(new ImplicitQueryParameter(lt.Value, lt.Location)), start) { if (parent != null) { base.CheckParentConflictName(parent.Toplevel, lt.Value, lt.Location); } }
protected override void CreateArguments(ResolveContext ec, out Arguments args) { args = new Arguments(4); args.Add(new Argument(expr)); LambdaExpression lambda = new LambdaExpression(outer_selector.StartLocation); lambda.Block = outer_selector; args.Add(new Argument(lambda)); lambda = new LambdaExpression(inner_selector.StartLocation); lambda.Block = inner_selector; args.Add(new Argument(lambda)); Expression result_selector_expr; LocatedToken into_variable = GetIntoVariable(); // // When select follows use is as result selector // if (next is Select) { result_selector_expr = next.expr; next = next.next; } else { result_selector_expr = CreateRangeVariableType(block, ec.MemberContext, into_variable, new SimpleName(into_variable.Value, into_variable.Location)); } LambdaExpression result_selector = new LambdaExpression(lt.Location); result_selector.Block = new QueryBlock(ec.Compiler, block.Parent, block.Parameters, into_variable, block.StartLocation); result_selector.Block.AddStatement(new ContextualReturn(result_selector_expr)); args.Add(new Argument(result_selector)); }
public RangeAnonymousTypeParameter(Expression initializer, LocatedToken parameter) : base(initializer, parameter.Value, parameter.Location) { }
public VariableDeclaration (LocatedToken lt, object eoai) : this (lt, eoai, null) { }
public VariableDeclaration (LocatedToken lt, object eoai, Attributes opt_attrs) { this.identifier = lt.Value; if (eoai is ArrayList) { this.expression_or_array_initializer = new ArrayCreation (CSharpParser.current_array_type, "", (ArrayList)eoai, lt.Location); } else { this.expression_or_array_initializer = (Expression)eoai; } this.Location = lt.Location; this.OptAttributes = opt_attrs; }
public QueryBlock (CompilerContext ctx, Block parent, ParametersCompiled parameters, LocatedToken lt, Location start) : base (ctx, parent, new ParametersCompiled (parameters [0].Clone (), new ImplicitQueryParameter (lt.Value, lt.Location)), start) { }
public QueryBlock(CompilerContext ctx, Block parent, ParametersCompiled parameters, LocatedToken lt, Location start) : base(ctx, parent, new ParametersCompiled(parameters [0].Clone(), new ImplicitQueryParameter(lt.Value, lt.Location)), start) { }
public TransparentParameter(ParametersCompiled parent, LocatedToken identifier) : base(ParameterNamePrefix + Counter++, identifier.Location) { Parent = parent; Identifier = identifier.Value; }
protected static Expression CreateRangeVariableType (ToplevelBlock block, TypeContainer container, LocatedToken name, Expression init) { ArrayList args = new ArrayList (2); args.Add (new AnonymousTypeParameter (block.Parameters [0])); args.Add (new RangeAnonymousTypeParameter (init, name)); return new AnonymousTypeDeclaration (args, container, name.Location); }
public SelectMany (ToplevelBlock block, LocatedToken lt, Expression expr) : base (block, expr) { this.lt = lt; }
public TransparentParameter (Parameters parent, LocatedToken identifier) : base (ParameterNamePrefix + Counter++, identifier.Location) { Parent = parent; Identifier = identifier.Value; }
public Let (ToplevelBlock block, TypeContainer container, LocatedToken identifier, Expression expr) : base (block, CreateRangeVariableType (block, container, identifier, expr)) { }
public GroupJoin (ToplevelBlock block, LocatedToken lt, Expression inner, ToplevelBlock outerSelector, ToplevelBlock innerSelector, LocatedToken into, Location loc) : base (block, lt, inner, outerSelector, innerSelector, loc) { this.into = into; }
public Join (ToplevelBlock block, LocatedToken lt, Expression inner, ToplevelBlock outerSelector, ToplevelBlock innerSelector, Location loc) : base (block, inner) { this.lt = lt; this.outer_selector = outerSelector; this.inner_selector = innerSelector; }
protected static Expression CreateRangeVariableType(ToplevelBlock block, IMemberContext context, LocatedToken name, Expression init) { ArrayList args = new ArrayList(2); args.Add(new AnonymousTypeParameter(block.Parameters [0])); args.Add(new RangeAnonymousTypeParameter(init, name)); return(new NewAnonymousType(args, context.CurrentTypeDefinition, name.Location)); }
public Let(ToplevelBlock block, TypeContainer container, LocatedToken identifier, Expression expr) : base(block, CreateRangeVariableType(block, container, identifier, expr)) { }
public QueryBlock (Block parent, LocatedToken lt, Location start) : base (parent, new Parameters (new ImplicitQueryParameter (lt.Value, lt.Location)), start) { if (parent != null) base.CheckParentConflictName (parent.Toplevel, lt.Value, lt.Location); }
public RangeAnonymousTypeParameter (Expression initializer, LocatedToken parameter) : base (initializer, parameter.Value, parameter.Location) { }
public GroupJoin(ToplevelBlock block, LocatedToken lt, Expression inner, ToplevelBlock outerSelector, ToplevelBlock innerSelector, LocatedToken into, Location loc) : base(block, lt, inner, outerSelector, innerSelector, loc) { this.into = into; }
public QueryBlock (Block parent, Parameters parameters, LocatedToken lt, Location start) : base (parent, new Parameters (parameters [0].Clone (), new ImplicitQueryParameter (lt.Value, lt.Location)), start) { }
public SelectMany(ToplevelBlock block, LocatedToken lt, Expression expr) : base(block, expr) { this.lt = lt; }
public void AddTransparentParameter (LocatedToken name) { base.CheckParentConflictName (this, name.Value, name.Location); parameters = new Parameters (new TransparentParameter (parameters, name)); }
protected static Expression CreateRangeVariableType(ToplevelBlock block, TypeContainer container, LocatedToken name, Expression init) { ArrayList args = new ArrayList(2); args.Add(new AnonymousTypeParameter(block.Parameters [0])); args.Add(new RangeAnonymousTypeParameter(init, name)); return(new AnonymousTypeDeclaration(args, container, name.Location)); }
public QueryBlock(Block parent, Parameters parameters, LocatedToken lt, Location start) : base(parent, new Parameters(parameters [0].Clone(), new ImplicitQueryParameter(lt.Value, lt.Location)), start) { }
public void AddTransparentParameter(LocatedToken name) { base.CheckParentConflictName(this, name.Value, name.Location); parameters = new ParametersCompiled(new TransparentParameter(parameters, name)); }
protected static Expression CreateRangeVariableType (ToplevelBlock block, IMemberContext context, LocatedToken name, Expression init) { ArrayList args = new ArrayList (2); args.Add (new AnonymousTypeParameter (block.Parameters [0])); args.Add (new RangeAnonymousTypeParameter (init, name)); return new NewAnonymousType (args, context.CurrentTypeDefinition, name.Location); }