/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
v2.0.0-RC3
src/ScriptEngine/ICompilerService.cs
49 строк
2 KB
EvilBeaver
Выделена отдельная папка для инфраструктуры исключений
24 июл 2023, 22:46
24 июл 2023, 22:46
d1c2e94
Код
Авторство
О чём код?
/*---------------------------------------------------------- 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.Contexts; using OneScript.Execution; using ScriptEngine.Machine; using OneScript.Sources; namespace ScriptEngine { /// <summary> /// Сервис компиляции единичного модуля. /// </summary> [Obsolete] public interface ICompilerService { bool GenerateDebugCode { get; set; } bool GenerateCodeStat { get; set; } int DefineVariable(string name, string alias, SymbolType type); int DefineMethod(BslMethodInfo methodSignature); void DefinePreprocessorValue(string name); IExecutableModule Compile(SourceCode source, Type classType = null); IExecutableModule CompileExpression(SourceCode source); IExecutableModule CompileBatch(SourceCode source); } /// <summary> /// Заглушка на стадии рефакторинга инфраструктуры компилятора /// </summary> public static class StackCompilerExtension { public static StackRuntimeModule CompileStack(this ICompilerService compiler, SourceCode source, Type classType = null) { return (StackRuntimeModule)compiler.Compile(source, classType); } } }