MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / DefineClassInit

Method DefineClassInit

source/script.cpp:6512–6528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6510
6511
6512UserFunc *Script::DefineClassInit(bool aStatic)
6513{
6514 TCHAR def[] = _T("__Init(){");
6515 if (!DefineFunc(def, aStatic))
6516 return nullptr;
6517 if (!aStatic)
6518 {
6519 if (!ParseAndAddLine(SUPER_KEYWORD _T(".__Init()"), ACT_EXPRESSION)) // Initialize base-class variables first. Relies on short-circuit evaluation.
6520 return nullptr;
6521 mLastLine->mLineNumber = 0; // Signal the debugger to skip this line while stepping in/over/out.
6522 }
6523 auto init_func = g->CurrentFunc;
6524 if (!AddLine(ACT_BLOCK_END)) // This also resets g->CurrentFunc to NULL.
6525 return nullptr;
6526 mLastLine->mLineNumber = 0; // See above.
6527 return init_func;
6528}
6529
6530
6531Object *Script::FindClass(LPCTSTR aClassName, size_t aClassNameLength)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected