import { VERSION } from "../version" import { ISerializedGast } from "../../api" 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 ) }