parseAndHandleNestedIntentSection = function (luResource, enableMergeIntents) {
    // handle nested intent section
    let sections = luResource.Sections.filter(s => s.SectionType === SectionType.NESTEDINTENTSECTION);
    if (sections && sections.length > 0) {
        sections.forEach(section => {
            if (enableMergeIntents) {
                let mergedIntentSection = section.SimpleIntentSections[0];
                mergedIntentSection.Name = section.Name;
                mergedIntentSection.Range = section.Range;
                for (let idx = 1; idx < section.SimpleIntentSections.length; idx++) {
                    mergedIntentSection.UtteranceAndEntitiesMap = mergedIntentSection.UtteranceAndEntitiesMap.concat(section.SimpleIntentSections[idx].UtteranceAndEntitiesMap);
                    mergedIntentSection.Entities = mergedIntentSection.Entities.concat(section.SimpleIntentSections[idx].Entities);
                }

                luResource.Sections.push(mergedIntentSection);
            } else {
                section.SimpleIntentSections.forEach(subSection => {
                    subSection.Name = section.Name + '.' + subSection.Name;
                    luResource.Sections.push(subSection);
                })
            }
        })
    }
}
Intent parser code to parse intent section.
@param {LUResouce} luResource resources extracted from lu file content
@param {boolean} enableMergeIntents enable functionality to merge intents in nested intent section or not
@throws {exception} Throws on errors. exception object includes errCode and text.