コード例 #1
0
ファイル: Compiler.cs プロジェクト: dauthleikr/Llama
        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();
        }
コード例 #2
0
        public CompilationContext(ICompilerStore store, IFactory <ILinkingInfo> linkingInfoFactory, ISymbolResolver symbolResolver, StorageManager storageManager)
        {
            Symbols = symbolResolver;
            Storage = storageManager;
            Linking = linkingInfoFactory.Create();

            _store = store;
            _linkingInfoFactory = linkingInfoFactory;
        }