Repository: godotengine/godot
File: modules/visual_script/register_types.cpp (C++)

Code before:
/*                                                                       */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
/*************************************************************************/

#include "register_types.h"

#include "core/config/engine.h"
#include "core/io/resource_loader.h"
#include "visual_script.h"
#include "visual_script_builtin_funcs.h"
#include "visual_script_editor.h"
#include "visual_script_expression.h"
#include "visual_script_flow_control.h"
#include "visual_script_func_nodes.h"
#include "visual_script_nodes.h"
#include "visual_script_yield_nodes.h"

VisualScriptLanguage *visual_script_language = nullptr;
#ifdef TOOLS_ENABLED
static vs_bind::VisualScriptEditor *vs_editor_singleton = nullptr;
#endif

void register_visual_script_types() {
	visual_script_language = memnew(VisualScriptLanguage);
	//script_language_gd->init();
	ScriptServer::register_language(visual_script_language);

	GDREGISTER_CLASS(VisualScript);
	GDREGISTER_VIRTUAL_CLASS(VisualScriptNode);
	GDREGISTER_CLASS(VisualScriptFunctionState);
	GDREGISTER_CLASS(VisualScriptFunction);
	GDREGISTER_VIRTUAL_CLASS(VisualScriptLists);
	GDREGISTER_CLASS(VisualScriptComposeArray);
	GDREGISTER_CLASS(VisualScriptOperator);
	GDREGISTER_CLASS(VisualScriptVariableSet);
	GDREGISTER_CLASS(VisualScriptVariableGet);
	GDREGISTER_CLASS(VisualScriptConstant);
	GDREGISTER_CLASS(VisualScriptIndexGet);
	GDREGISTER_CLASS(VisualScriptIndexSet);
	GDREGISTER_CLASS(VisualScriptGlobalConstant);
	GDREGISTER_CLASS(VisualScriptClassConstant);
	GDREGISTER_CLASS(VisualScriptMathConstant);
	GDREGISTER_CLASS(VisualScriptBasicTypeConstant);
	GDREGISTER_CLASS(VisualScriptEngineSingleton);
	GDREGISTER_CLASS(VisualScriptSceneNode);

Review comment (bug):
Should this be renamed too?

```suggestion
static VisualScriptCustomNodes *vs_custom_nodes_singleton = nullptr;
```

Code after:
/*                                                                       */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
/*************************************************************************/

#include "register_types.h"

#include "core/config/engine.h"
#include "core/io/resource_loader.h"
#include "visual_script.h"
#include "visual_script_builtin_funcs.h"
#include "visual_script_editor.h"
#include "visual_script_expression.h"
#include "visual_script_flow_control.h"
#include "visual_script_func_nodes.h"
#include "visual_script_nodes.h"
#include "visual_script_yield_nodes.h"

VisualScriptLanguage *visual_script_language = nullptr;
#ifdef TOOLS_ENABLED
static VisualScriptCustomNodes *vs_custom_nodes_singleton = nullptr;
#endif

void register_visual_script_types() {
	visual_script_language = memnew(VisualScriptLanguage);
	//script_language_gd->init();
	ScriptServer::register_language(visual_script_language);

	GDREGISTER_CLASS(VisualScript);
	GDREGISTER_VIRTUAL_CLASS(VisualScriptNode);
	GDREGISTER_CLASS(VisualScriptFunctionState);
	GDREGISTER_CLASS(VisualScriptFunction);
	GDREGISTER_VIRTUAL_CLASS(VisualScriptLists);
	GDREGISTER_CLASS(VisualScriptComposeArray);
	GDREGISTER_CLASS(VisualScriptOperator);
	GDREGISTER_CLASS(VisualScriptVariableSet);
	GDREGISTER_CLASS(VisualScriptVariableGet);
	GDREGISTER_CLASS(VisualScriptConstant);
	GDREGISTER_CLASS(VisualScriptIndexGet);
	GDREGISTER_CLASS(VisualScriptIndexSet);
	GDREGISTER_CLASS(VisualScriptGlobalConstant);
	GDREGISTER_CLASS(VisualScriptClassConstant);
	GDREGISTER_CLASS(VisualScriptMathConstant);
	GDREGISTER_CLASS(VisualScriptBasicTypeConstant);
	GDREGISTER_CLASS(VisualScriptEngineSingleton);
	GDREGISTER_CLASS(VisualScriptSceneNode);