import { YamlCategory, YamlScript } from 'js-yaml-loader!@/application.yaml'; import { Script } from '@/domain/Script'; import { Category } from '@/domain/Category'; import { parseDocUrls } from './DocumentationParser'; import { parseScript } from './ScriptParser'; import { IScriptCompiler } from './Compiler/IScriptCompiler'; let categoryIdCounter: number = 0; interface ICategoryChildren { subCategories: Category[]; subScripts: Script[]; } export function parseCategory(category: YamlCategory, compiler: IScriptCompiler): Category { if (!compiler) { throw new Error('undefined compiler'); } ensureValid(category); const children: ICategoryChildren = { subCategories: new Array(), subScripts: new Array