import { VERSION } from "../version.js"; import { ISerializedGast } from "@chevrotain/types"; export function createSyntaxDiagramsCode( grammar: ISerializedGast[], { resourceBase = `https://unpkg.com/chevrotain@${VERSION}/diagrams/`, css = `https://unpkg.com/chevrotain@${VERSION}/diagrams/diagrams.css`, }: { resourceBase?: string; css?: string; } = {}, ) { const header = ` `; const cssHtml = ` `; const scripts = ` `; const diagramsDiv = `
`; const serializedGrammar = ` `; const initLogic = ` `; return ( header + cssHtml + scripts + diagramsDiv + serializedGrammar + initLogic ); }