class ActionDispatch::Journey::Visitors::FunctionalVisitor

:nodoc:

def accept(node, seed)

def accept(node, seed)
  visit(node, seed)
end

def binary(node, seed)

def binary(node, seed)
  visit(node.right, visit(node.left, seed))
end

def nary(node, seed)

def nary(node, seed)
  node.children.inject(seed) { |s, c| visit(c, s) }
end

def terminal(node, seed); seed; end

def terminal(node, seed);   seed; end

def unary(node, seed)

def unary(node, seed)
  visit(node.left, seed)
end

def visit(node, seed)

def visit(node, seed)
  send(DISPATCH_CACHE[node.type], node, seed)
end

def visit_CAT(n, seed); binary(n, seed); end

def visit_CAT(n, seed); binary(n, seed); end

def visit_DOT(n, seed); terminal(n, seed); end

def visit_DOT(n, seed);     terminal(n, seed); end

def visit_GROUP(n, seed); unary(n, seed); end

def visit_GROUP(n, seed); unary(n, seed); end

def visit_LITERAL(n, seed); terminal(n, seed); end

def visit_LITERAL(n, seed); terminal(n, seed); end

def visit_OR(n, seed); nary(n, seed); end

def visit_OR(n, seed); nary(n, seed); end

def visit_SLASH(n, seed); terminal(n, seed); end

def visit_SLASH(n, seed);   terminal(n, seed); end

def visit_STAR(n, seed); unary(n, seed); end

def visit_STAR(n, seed); unary(n, seed); end

def visit_SYMBOL(n, seed); terminal(n, seed); end

def visit_SYMBOL(n, seed);  terminal(n, seed); end