Skip to main content

Home > blockly > CodeGenerator > init

CodeGenerator.init() method

Hook for code to run before code generation starts. Subclasses may override this, e.g. to initialise the database of variable names.

Signature:

init(_workspace: Workspace): void;

Parameters

ParameterTypeDescription
_workspaceWorkspaceWorkspace to generate code from.

Returns:

void