private void Reset() { _controller = new RuntimeBinderController(); _semanticChecker = new LangCompiler(_controller, new NameManager()); BSYMMGR bsymmgr = _semanticChecker.getBSymmgr(); NameManager nameManager = _semanticChecker.GetNameManager(); InputFile infile = bsymmgr.GetMiscSymFactory().CreateMDInfile(nameManager.Lookup(""), (mdToken)0); infile.SetAssemblyID(bsymmgr.AidAlloc(infile)); infile.AddToAlias(KAID.kaidThisAssembly); infile.AddToAlias(KAID.kaidGlobal); _symbolTable = new SymbolTable( bsymmgr.GetSymbolTable(), bsymmgr.GetSymFactory(), nameManager, _semanticChecker.GetTypeManager(), bsymmgr, _semanticChecker, infile); _semanticChecker.getPredefTypes().Init(_semanticChecker.GetErrorContext(), _symbolTable); _semanticChecker.GetTypeManager().InitTypeFactory(_symbolTable); SymbolLoader.getPredefinedMembers().RuntimeBinderSymbolTable = _symbolTable; SymbolLoader.SetSymbolTable(_symbolTable); _exprFactory = new ExprFactory(_semanticChecker.GetSymbolLoader().GetGlobalSymbolContext()); _outputContext = new OutputContext(); _nameGenerator = new NameGenerator(); _bindingContext = BindingContext.CreateInstance( _semanticChecker, _exprFactory, _outputContext, _nameGenerator, false, true, false, false, false, false, 0); _binder = new ExpressionBinder(_bindingContext); }
public void InitTypeFactory(SymbolTable table) { _symbolTable = table; }
internal void SetSymbolTable(SymbolTable symbolTable) { RuntimeBinderSymbolTable = symbolTable; }