Module: RegularExpression::AST
- Defined in:
- lib/regular_expression/ast.rb
Defined Under Namespace
Modules: Quantifier Classes: Anchor, Character, CharacterClass, CharacterGroup, CharacterRange, Expression, Group, Match, Period, Root
Class Method Summary collapse
Class Method Details
.to_dot(root) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/regular_expression/ast.rb', line 5 def self.to_dot(root) graph = Graphviz::Graph.new root.to_dot(graph) Graphviz.output(graph, path: "build/ast.svg", format: "svg") graph.to_dot end |