Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 2.27 KB

File metadata and controls

23 lines (19 loc) · 2.27 KB

EN

About the compiler and its basic implementation Compiler_IIDL

The compiler must implement the ICompiler interface. That is, it must have a CompileMain method that accepts an object of type CompileStack (a stack for data during compilation), string code (all the code in the form of a string), string convertorName (the name of the compiler for the main file) and string name (the name of the main function) (will be displayed in the error stack when DebugEnviroment is selected).

Compiler_IIDL base compiler. This compiler first imports all dependencies it finds and dependencies for all dependencies. The imported code will be inserted instead of the #import directive. Next, all C# libraries added with the #include directive will be included. After that, the code first compiles all the directives. And then all the usual code will be compiled.

UA

Про компілятор та його базову реалізацію Compiler_IIDL

Компілятор повинен реалізовувати інтерфейс ICompilator. Тобто повинен мати метод CompilateMain, що приймає обєкт типу CompileStack(стек для даних під час компіляції), string code(весь код у вигляді строки), string convertorName (назва компілятору для головного файлу) і string name (назва головної функції)(буде відображатися у стеку помилок при обраному середовищі DebugEnviroment).

Базовий компілятор Compilator_IIDL. Цей компілятор спершу імпортує всі залежності, що знайде та залежності для всіх залежностей. Імпортований код буде вставлений замість директиви #import. Далі відбудеться включення всіх бібліотек на C# що додані директивою #include. Після цього у коді спершу скомпілюються всі директиви. А далі вже будть компілюватися весь звичайний код.