protected override Variable Evaluate(ParsingScript script) { List <Variable> args = script.GetFunctionArgs(); Utils.CheckArgs(args.Count, 1, m_name, true); string filename = args[0].AsString(); string pathname = script.GetFilePath(filename); EncodeFileFunction.EncodeDecode(pathname, false); ParsingScript tempScript = script.GetIncludeFileScript(filename); string includeScript = tempScript.String; EncodeFileFunction.EncodeDecode(pathname, true); Variable result = null; if (script.Debugger != null) { result = script.Debugger.StepInIncludeIfNeeded(tempScript).Result; } while (tempScript.Pointer < includeScript.Length) { result = tempScript.Execute(); tempScript.GoToNextStatement(); } return(result == null ? Variable.EmptyInstance : result); }
protected override Variable Evaluate(ParsingScript script) { List <Variable> args = script.GetFunctionArgs(); Utils.CheckArgs(args.Count, 1, m_name, true); string filename = args[0].AsString(); string pathname = script.GetFilePath(filename); return(EncodeDecode(pathname, m_encode)); }