예제 #1
0
        public Context(Compiler compiler, IPlatform platform, CompilerFlags flags,
                       TextWriter errorWriter, TextWriter warningWriter, TextWriter logWriter)
        {
            GeneralScope = new Scope(this);

            Compiler = compiler;

            Platform      = platform;
            Transpilers   = platform.Transpilers;
            Api           = platform.Api;
            Flags         = flags;
            ErrorWriter   = errorWriter;
            WarningWriter = warningWriter;
            LogWriter     = logWriter;

            _typeTranspilers = Transpilers.ToDictionary(key => key.StatementType);

            CultureInfo    = CultureInfo.CurrentCulture;
            StringComparer = StringComparer.CurrentCulture;

            Includes = new HashSet <string>();

            InitializeContext();
        }