/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
v2.0.2
src/Tests/OneScript.Dynamic.Tests/CompilerTestBase.cs
36 строк
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.Collections.Generic; using Moq; using OneScript.Compilation.Binding; using OneScript.Execution; using OneScript.Language; using OneScript.Native.Compiler; namespace OneScript.Dynamic.Tests; public class CompilerTestBase { protected DynamicModule CreateModule(string code) { var helper = new CompileHelper(); helper.ParseModule(code); var result = helper.Compile(new SymbolTable(), Mock.Of<IBslProcess>()); helper.ThrowOnErrors(); return result; } protected DynamicModule CreateModule(string code, List<CodeError> errors) { var helper = new CompileHelper(); helper.ParseModule(code); var result = helper.Compile(new SymbolTable(), Mock.Of<IBslProcess>()); errors.AddRange(helper.Errors); return result; } }