AddTypeContainer() public method

public AddTypeContainer ( TypeContainer tc ) : void
tc TypeContainer
return void
Beispiel #1
0
        public static CSharpParser Parse(SeekableStreamReader reader, SourceFile sourceFile, ModuleContainer module, ParserSession session, Report report, int lineModifier = 0, int colModifier = 0)
        {
            var file = new CompilationSourceFile(module, sourceFile);

            module.AddTypeContainer(file);

            CSharpParser parser = new CSharpParser(reader, file, report, session);

            parser.Lexer.Line   += lineModifier;
            parser.Lexer.Column += colModifier;
            parser.Lexer.sbag    = new SpecialsBag();
            parser.parse();
            return(parser);
        }
Beispiel #2
0
        public Evaluator(CompilerContext ctx)
        {
            this.ctx = ctx;

            module           = new ModuleContainer(ctx);
            module.Evaluator = this;

            source_file = new CompilationSourceFile(module, null);
            module.AddTypeContainer(source_file);

            startup_files = ctx.SourceFiles.Count;

            // FIXME: Importer needs this assembly for internalsvisibleto
            module.SetDeclaringAssembly(new AssemblyDefinitionDynamic(module, "evaluator"));
            importer = new ReflectionImporter(module, ctx.BuiltinTypes);

            InteractiveBaseClass = typeof(InteractiveBase);
            fields = new Dictionary <string, Tuple <FieldSpec, FieldInfo> > ();
        }
Beispiel #3
0
		public static CSharpParser Parse (SeekableStreamReader reader, SourceFile sourceFile, ModuleContainer module, ParserSession session, Report report, int lineModifier = 0, int colModifier = 0)
		{
			var file = new CompilationSourceFile (module, sourceFile);
			module.AddTypeContainer(file);

			CSharpParser parser = new CSharpParser (reader, file, report, session);
			parser.Lexer.Line += lineModifier;
			parser.Lexer.Column += colModifier;
			parser.Lexer.sbag = new SpecialsBag ();
			parser.parse ();
			return parser;
		}
Beispiel #4
0
		public Evaluator (CompilerContext ctx)
		{
			this.ctx = ctx;

			module = new ModuleContainer (ctx);
			module.Evaluator = this;

			source_file = new CompilationSourceFile (module, null);
			module.AddTypeContainer (source_file);

			startup_files = ctx.SourceFiles.Count;

			// FIXME: Importer needs this assembly for internalsvisibleto
			module.SetDeclaringAssembly (new AssemblyDefinitionDynamic (module, "evaluator"));
			importer = new ReflectionImporter (module, ctx.BuiltinTypes);

			InteractiveBaseClass = typeof (InteractiveBase);
			fields = new Dictionary<string, Tuple<FieldSpec, FieldInfo>> ();
		}