Exemplo n.º 1
0
        public Compiler(ICompilerStore nodeCompilers, IFactory <ILinkingInfo> linkingInfoFactory, IEnumerable <FunctionImport> imports, IEnumerable <FunctionDeclaration> declarations)
        {
            _nodeCompilers      = nodeCompilers ?? throw new ArgumentNullException(nameof(nodeCompilers));
            _linkingInfoFactory = linkingInfoFactory ?? throw new ArgumentNullException(nameof(linkingInfoFactory));
            _imports            = imports ?? throw new ArgumentNullException(nameof(imports));
            _declarations       = declarations ?? throw new ArgumentNullException(nameof(declarations));

            LinkingInfo = _linkingInfoFactory.Create();
        }
Exemplo n.º 2
0
        public CompilationContext(ICompilerStore store, IFactory <ILinkingInfo> linkingInfoFactory, ISymbolResolver symbolResolver, StorageManager storageManager)
        {
            Symbols = symbolResolver;
            Storage = storageManager;
            Linking = linkingInfoFactory.Create();

            _store = store;
            _linkingInfoFactory = linkingInfoFactory;
        }