All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.shiftleft.semanticcpg.dotgenerator.DotAstGenerator.scala Maven / Gradle / Ivy

There is a newer version: 4.0.77
Show newest version
package io.shiftleft.semanticcpg.dotgenerator

import io.shiftleft.codepropertygraph.generated.nodes.AstNode

object DotAstGenerator {

  def dotAst[T <: AstNode](traversal: Iterator[T]): Iterator[String] =
    traversal.map(dotAst)

  def dotAst(astRoot: AstNode): String = {
    val ast = new AstGenerator().generate(astRoot)
    DotSerializer.dotGraph(Option(astRoot), ast)
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy