ScratchScript 1.0 Help

Procedures and Functions

The compiler has different uses for "procedures" and "functions".

ScratchScriptVisitor contains these definitions:

public List<ScratchIrProcedure> Procedures = new(); public List<ScratchFunction> Functions = new();

Procedures contains currently processing functions and is only used when defining the function and converting it's body to the IR representation. This list does not include native functions.

Functions on the other hand contains already processed functions, which includes both native and declared functions which have been converted to ScratchIR by the compiler. The list is used for all function calls and imports.

Last modified: 02 мая 2024