Exemple #1
0
        internal AstGenerator(RubyCompilerOptions/*!*/ options, SourceUnit/*!*/ sourceUnit, RubyEncoding/*!*/ encoding,
            bool debugCompiler, bool debugMode, bool traceEnabled, bool profilerEnabled, bool savingToDisk) {

            Assert.NotNull(options, encoding, sourceUnit);
            _context = (RubyContext)sourceUnit.LanguageContext;
            _compilerOptions = options;
            _debugCompiler = debugCompiler;
            _debugMode = debugMode;
            _traceEnabled = traceEnabled;
            _sourceUnit = sourceUnit;
            _document = sourceUnit.Document;
            _encoding = encoding;
            _profiler = profilerEnabled ? Profiler.Instance : null;
            _savingToDisk = savingToDisk;
        }
Exemple #2
0
        private MSA.Expression _sourcePathConstant; // lazy

        internal AstGenerator(RubyContext/*!*/ context, RubyCompilerOptions/*!*/ options, MSA.SymbolDocumentInfo document, RubyEncoding/*!*/ encoding,
            bool printInteractiveResult) {

            Assert.NotNull(context, options, encoding);
            _context = context;
            _compilerOptions = options;
            _debugCompiler = Snippets.Shared.SaveSnippets;
            _debugMode = context.DomainManager.Configuration.DebugMode;
            _traceEnabled = context.RubyOptions.EnableTracing;
            _document = document;
            _encoding = encoding;
            _profiler = context.RubyOptions.Profile ? Profiler.Instance : null;
            _savingToDisk = context.RubyOptions.SavePath != null;
            _printInteractiveResult = printInteractiveResult;
        }
Exemple #3
0
        internal AstGenerator(RubyContext/*!*/ context, RubyCompilerOptions/*!*/ options, MSA.SymbolDocumentInfo document, RubyEncoding/*!*/ encoding,
            bool printInteractiveResult) {

            Assert.NotNull(context, options, encoding);
            _context = context;
            _compilerOptions = options;
            _debugMode = context.DomainManager.Configuration.DebugMode;
            _traceEnabled = context.RubyOptions.EnableTracing;
            _document = document;
            _sequencePointClearance = (document != null) ? Ast.ClearDebugInfo(document) : null;
            _encoding = encoding;
            _encodingConstant = Ast.Constant(encoding);
            _profiler = context.RubyOptions.Profile ? Profiler.Instance : null;
            _savingToDisk = context.RubyOptions.SavePath != null;
            _printInteractiveResult = printInteractiveResult;
#if SILVERLIGHT
            _debugCompiler = false;
#else
            _debugCompiler = Snippets.Shared.SaveSnippets;
#endif
        }