class ActionDispatch::Journey::Visitors::FormatBuilder

:nodoc:

def accept(node); Journey::Format.new(super); end

:nodoc:
def accept(node); Journey::Format.new(super); end

def binary(node)

def binary(node)
  visit(node.left) + visit(node.right)
end

def terminal(node); [node.left]; end

def terminal(node); [node.left]; end

def visit_GROUP(n); [Journey::Format.new(unary(n))]; end

def visit_GROUP(n); [Journey::Format.new(unary(n))]; end

def visit_STAR(n)

def visit_STAR(n)
  [Journey::Format.required_path(n.left.to_sym)]
end

def visit_SYMBOL(n)

def visit_SYMBOL(n)
  symbol = n.to_sym
  if symbol == :controller
    [Journey::Format.required_path(symbol)]
  else
    [Journey::Format.required_segment(symbol)]
  end
end