code: function buildSyntaxDiagramsText(topRules) {
          var diagramsHtml = ""
  
          topRules.forEach(function(production) {
              var currDiagramHtml = convertProductionToDiagram(
                  production,
                  production.name
              )
              diagramsHtml +=
                  '<h2 class="diagramHeader">' +
                  production.name +
                  "</h2>" +
                  currDiagramHtml
          })
  
          return diagramsHtml
      }
docs: @param {chevrotain.gast.ISerializedGast} topRules
  
  @returns {string} - The htmlText that will render the diagrams