class RegularExpression::AST::Quantifier::Optional

Public Instance Methods

quantify(start, finish) { |start, finish| ... } click to toggle source
# File lib/regular_expression/ast.rb, line 289
def quantify(start, finish)
  yield start, finish
  start.add_transition(NFA::Transition::Epsilon.new(finish))
end
to_dot(parent) click to toggle source
# File lib/regular_expression/ast.rb, line 285
def to_dot(parent)
  parent.add_node(object_id, label: "?", shape: "box")
end