Inheritance: System.Collections.CollectionBase
Beispiel #1
0
        public CompilerParameters(bool loadDefaultReferences)
        {
            _libpaths  = new ArrayList();
            _systemDir = GetSystemDir();
            _libpaths.Add(_systemDir);
            _libpaths.Add(Directory.GetCurrentDirectory());

            _pipeline           = null;
            _input              = new CompilerInputCollection();
            _resources          = new CompilerResourceCollection();
            _assemblyReferences = new AssemblyCollection();

            _maxAttributeSteps = 2;
            _outputAssembly    = string.Empty;
            _outputType        = CompilerOutputType.ConsoleApplication;
            _outputWriter      = System.Console.Out;
            _debug             = true;
            _checked           = true;
            _generateInMemory  = true;
            _StdLib            = true;

            _delaySign = false;

            if (loadDefaultReferences)
            {
                LoadDefaultReferences();
            }
        }
Beispiel #2
0
 public CompilerParameters()
 {
     _pipeline           = new CompilerPipeline();
     _input              = new CompilerInputCollection();
     _assemblyReferences = new AssemblyCollection();
     _assemblyReferences.Add(GetType().Assembly);
     _assemblyReferences.Add(typeof(string).Assembly);                                  // corlib
     _assemblyReferences.Add(System.Reflection.Assembly.LoadWithPartialName("System")); // System
     _maxAttributeSteps = 2;
     _outputAssembly    = string.Empty;
     _outputType        = CompilerOutputType.ConsoleApplication;
 }
Beispiel #3
0
 public CompilerParameters()
 {
     _pipeline           = null;
     _input              = new CompilerInputCollection();
     _resources          = new CompilerResourceCollection();
     _assemblyReferences = new AssemblyCollection();
     _assemblyReferences.Add(typeof(Boo.Lang.Builtins).Assembly);
     _assemblyReferences.Add(GetType().Assembly);
     _assemblyReferences.Add(typeof(object).Assembly);                                  // corlib
     _assemblyReferences.Add(System.Reflection.Assembly.LoadWithPartialName("System")); // System
     _maxAttributeSteps = 2;
     _outputAssembly    = string.Empty;
     _outputType        = CompilerOutputType.ConsoleApplication;
     _outputWriter      = System.Console.Out;
     _debug             = true;
     _generateInMemory  = true;
 }
Beispiel #4
0
        public CompilerContext(CompilerParameters options, CompileUnit unit)
        {
            if (null == options)
            {
                throw new ArgumentNullException("options");
            }

            if (null == unit)
            {
                throw new ArgumentNullException("unit");
            }

            _unit               = unit;
            _errors             = new ErrorCollection();
            _assemblyReferences = options.References;
            _parameters         = options;
            _bindingManager     = new Bindings.BindingManager();
            _traceSwitch        = _parameters.TraceSwitch;
        }
Beispiel #5
0
        public CompilerContext(CompilerParameters options, CompileUnit unit)
        {
            if (null == options)
            {
                throw new ArgumentNullException("options");
            }
            if (null == unit)
            {
                throw new ArgumentNullException("unit");
            }

            _unit                  = unit;
            _errors                = new CompilerErrorCollection();
            _warnings              = new CompilerWarningCollection();
            _assemblyReferences    = options.References;
            _parameters            = options;
            _nameResolutionService = new TypeSystem.NameResolutionService(this);
            _traceSwitch           = _parameters.TraceSwitch;
            _properties            = new Hash();
        }
Beispiel #6
0
        public CompilerContext(CompilerParameters options, CompileUnit unit)
        {
            if (null == options) throw new ArgumentNullException("options");
            if (null == unit) throw new ArgumentNullException("unit");

            _unit = unit;
            _errors = new CompilerErrorCollection();
            _warnings = new CompilerWarningCollection();
            _assemblyReferences = options.References;
            _parameters = options;
            if (_parameters.Debug && !_parameters.Defines.ContainsKey("DEBUG"))
                _parameters.Defines.Add("DEBUG", null);
            _nameResolutionService = new TypeSystem.NameResolutionService(this);
            _properties = new Hash();
        }
        public CompilerParameters(bool loadDefaultReferences)
        {
            _libpaths = new ArrayList();
            _systemDir = GetSystemDir();
            _libpaths.Add(_systemDir);
            _libpaths.Add(Directory.GetCurrentDirectory());

            _pipeline = null;
            _input = new CompilerInputCollection();
            _resources = new CompilerResourceCollection();
            _assemblyReferences = new AssemblyCollection();

            _maxAttributeSteps = 2;
            _outputAssembly = string.Empty;
            _outputType = CompilerOutputType.ConsoleApplication;
            _outputWriter = System.Console.Out;
            _debug = true;
            _checked = true;
            _generateInMemory = true;
            _StdLib = true;

            _delaySign = false;

            if (loadDefaultReferences) LoadDefaultReferences();
        }
Beispiel #8
0
        public CompilerParameters(bool loadDefaultReferences)
        {
            _libpaths = new ArrayList();
            _systemDir = GetSystemDir();
            _libpaths.Add(_systemDir);
            _libpaths.Add(Directory.GetCurrentDirectory());

            _pipeline = null;
            _input = new CompilerInputCollection();
            _resources = new CompilerResourceCollection();
            _assemblyReferences = new AssemblyCollection();

            _maxExpansionIterations = 4;
            _outputAssembly = string.Empty;
            _outputType = CompilerOutputType.ConsoleApplication;
            _outputWriter = System.Console.Out;
            _debug = true;
            _checked = true;
            _generateInMemory = true;
            _StdLib = true;

            if (null != Environment.GetEnvironmentVariable("TRACE"))
                EnableTraceSwitch();

            _delaySign = false;

            if (loadDefaultReferences) LoadDefaultReferences();
        }