// We use 'Parent' to hook up to the containing block, but don't want to register the current block as a child. // So, we use a two-stage setup -- first pass a null parent to the base constructor, and then override 'Parent'. public ToplevelBlock (CompilerContext ctx, Block parent, Flags flags, ParametersCompiled parameters, Location start) : base (null, flags, start, Location.Null) { this.compiler = ctx; this.Toplevel = this; this.parameters = parameters; this.Parent = parent; if (parent != null) parent.AddAnonymousChild (this); if (!this.parameters.IsEmpty) ProcessParameters (); }