Theory of Operation - SkyeTheFoxyFox/sfmlog GitHub Wiki

This page outlines the theory of operation for sfmlog.

Sfmlog is a preprocessor for the mlog language used by mindustry. It is intended to be used to make managing larger projects easier via macros, and global constants, and it also just allows for some cool stuff to be done.

When executing, sfmlog will execute much like mlog, starting from the top, and working down. When processing an instruction if it doesn't know what it is, it assumes it to be an mlog instruction, so it expands any variables, and appends it to the output as an instruction that will be included in game. Sfmlog does not implement any sort of mlog optimizations or direct mlog simplifications, it is purely a tool to let the user define those themself.