Ejemplo n.º 1
0
        public override string VisitASTView(ASTView astView)
        {
            var ast           = astView.Nodes.Select(Generator.Find).ToList();
            var mermaidMapper = new MermaidMapper(new ASTGenerator(ast));

            mermaidMapper.Start().ToList();
            var mermaidString = mermaidMapper.ToString().Trim();
            var result        = $@"<div class=""svg-container""><div class=""mermaid"">{mermaidString}</div></div>";

            Parts.Add(result);
            return(result);
        }
Ejemplo n.º 2
0
 public HtmlMapper(IEnumerable <IASTNode> nodeTree) : base(nodeTree)
 {
     this.MermaidMapper = new MermaidMapper(nodeTree);
     this.MermaidMapper.Start().ToList();
 }