function objectMerge(target, source) {
            for (const key of Object.keys(source)) {
                const currTarget = target[key];
                const currSource = source[key];

                if (currTarget) {
                    const objSource = typeof currSource === 'object';
                    const objTarget = typeof currTarget === 'object';

                    if (objSource && objTarget) {
                        void objectMerge(currTarget, currSource)
                        continue;
                    }
                }

                target[key] = currSource;
            }

            return target;
        }
Extract each code formula as an object to be merged with the next one until we end up with an object containing all the objects present in the formula with proper children
The resulting object will be later used as model for autocompletion