public SourceCodeProperties GetCodeProperties(string code, SourceCodeKind kind, ErrorSink errorSink)
 {
     return(_engine.GetCodeProperties(code, kind, errorSink));
 }
 public ICompiledCode CompileSourceUnit(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink)
 {
     return(RemoteWrapper.WrapRemotable <ICompiledCode>(_engine.CompileSourceUnit(sourceUnit, options, errorSink)));
 }
 public IScriptModule CompileModule(string name, ScriptModuleKind kind, CompilerOptions options, ErrorSink errorSink, IAttributesCollection dictionary, params SourceUnit[] sourceUnits)
 {
     return(RemoteWrapper.WrapRemotable <IScriptModule>(_manager.Environment.CompileModule(name, kind, options, errorSink, dictionary, sourceUnits)));
 }
示例#4
0
 public ICompiledCode CompileSourceUnit(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink)
 {
     Contract.RequiresNotNull(sourceUnit, "sourceUnit");
     return(new CompiledCode(_languageContext.CompileSourceCode(sourceUnit, options, errorSink)));
 }
示例#5
0
        public SourceCodeProperties GetCodeProperties(string code, SourceCodeKind kind, ErrorSink errorSink)
        {
            Contract.RequiresNotNull(code, "code");
            SourceUnit sourceUnit = SourceUnit.CreateSnippet(this, code, kind);

            // create compiler context with null error sink:
            CompilerContext compilerContext = new CompilerContext(sourceUnit, null, errorSink ?? new ErrorSink());

            _languageContext.UpdateSourceCodeProperties(compilerContext);

            if (!sourceUnit.CodeProperties.HasValue)
            {
                return(SourceCodeProperties.None);
            }

            return(sourceUnit.CodeProperties.Value);
        }
示例#6
0
 /// <summary>
 /// Compiles a list of source units into a single module.
 /// <c>options</c> can be <c>null</c>
 /// <c>errroSink</c> can be <c>null</c>
 /// <c>dictionary</c> can be <c>null</c>
 /// </summary>
 public IScriptModule CompileModule(string name, ScriptModuleKind kind, CompilerOptions options, ErrorSink errorSink,
                                    IAttributesCollection dictionary, params SourceUnit[] sourceUnits)
 {
     return(_manager.CompileModule(name, kind, new Scope(dictionary), options, errorSink, sourceUnits));
 }
 public IScriptModule CompileModule(string name, ScriptModuleKind kind, CompilerOptions options, ErrorSink errorSink, IAttributesCollection dictionary, params SourceUnit[] sourceUnits) {
     return RemoteWrapper.WrapRemotable<IScriptModule>(_manager.Environment.CompileModule(name, kind, options, errorSink, dictionary, sourceUnits));
 }