/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
src/ScriptEngine/Compiler/NativeCompilerBackend.cs
38 строк
1 KB
EvilBeaver
Начальное пробрасывание процесса загрузки библиотек в компилятор
11 мар 2025, 14:43
11 мар 2025, 14:43
6fd8a1e
Код
Авторство
О чём код?
/*---------------------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ----------------------------------------------------------*/ using System; using OneScript.Compilation; using OneScript.Compilation.Binding; using OneScript.DependencyInjection; using OneScript.Execution; using OneScript.Language; using OneScript.Language.SyntaxAnalysis.AstNodes; using OneScript.Native.Compiler; namespace ScriptEngine.Compiler { public class NativeCompilerBackend : ICompilerBackend { private readonly ModuleCompiler _codeGen; public NativeCompilerBackend(IErrorSink errorSink, IServiceContainer services) { _codeGen = new ModuleCompiler(errorSink, services, services.Resolve<IDependencyResolver>()); } public bool GenerateDebugCode { get; set; } public bool GenerateCodeStat { get; set; } public SymbolTable Symbols { get; set; } public IExecutableModule Compile(ModuleNode parsedModule, Type classType, IBslProcess process) { return _codeGen.Compile(parsedModule.Source, parsedModule, Symbols, process); } } }