/// <summary>Compiles a set of parameters into an array of compiled fragments.</summary> /// <param name="brackets">The parent block which contains each parameter as a child.</param> /// <param name="parentBlock">The method the parameters are for.</param> /// <returns>A set of compiled fragments.</returns> public static CompiledFragment[] CompileParameters(CodeFragment brackets, CompiledMethod parentBlock) { if (!brackets.IsParent) { return(null); } int count = 0; brackets.Compile(parentBlock); CodeFragment child = brackets.FirstChild; CompiledFragment[] output = new CompiledFragment[brackets.ChildCount()]; while (child != null) { CompiledFragment frag = (CompiledFragment)child; if (frag == null) { return(null); } output[count] = frag; count++; child = child.NextChild; } return(output); }
/// <summary>Compiles a set of parameters into an array of compiled fragments.</summary> /// <param name="brackets">The parent block which contains each parameter as a child.</param> /// <param name="parentBlock">The method the parameters are for.</param> /// <returns>A set of compiled fragments.</returns> public static CompiledFragment[] CompileParameters(CodeFragment brackets,CompiledMethod parentBlock){ if(!brackets.IsParent){ return null; } int count=0; brackets.Compile(parentBlock); CodeFragment child=brackets.FirstChild; CompiledFragment[] output=new CompiledFragment[brackets.ChildCount()]; while(child!=null){ CompiledFragment frag=(CompiledFragment)child; if(frag==null){ return null; } output[count]=frag; count++; child=child.NextChild; } return output; }