libprimis
libprimis copied to clipboard
Reduce deep nesting in `command.cpp`
Parts of command.cpp
are nested 11-deep, making the code almost impossible to parse. This should be flattened to about half as deep if possible. command.cpp
handles Cubescript functionality and is therefore quite important to the integrity of the scripting and UI side of the engine.
The worst offenders are compilelookup()
(9-deep) and compilestatements()
(11-deep), but this deep nesting occurs elsewhere as well.