/// <summary> /// Creates a new FunctionMethodGenerator instance. /// </summary> /// <param name="engine"> The script engine. </param> /// <param name="scope"> The function scope. </param> /// <param name="name"> The name of the function. </param> /// <param name="argumentNames"> The names of the arguments. </param> /// <param name="bodyText"> The source code of the function. </param> /// <param name="body"> The root of the abstract syntax tree for the body of the function. </param> /// <param name="scriptPath"> The URL or file system path that the script was sourced from. </param> /// <param name="options"> Options that influence the compiler. </param> public FunctionMethodGenerator(ScriptEngine engine, DeclarativeScope scope, string functionName, IList<string> argumentNames, string bodyText, Statement body, string scriptPath, CompilerOptions options) : base(engine, scope, new DummyScriptSource(scriptPath), options) { this.Name = functionName; this.ArgumentNames = argumentNames; this.BodyRoot = body; this.BodyText = bodyText; Validate(); }