def add_indirect_path(node, path, params)
      parts = url_parts(path)

      parts.each_with_index do |part, index|
        if has_binding?(part)
          # Strip off {{ and }}
          section_matcher, multipart = binding_extract(part)

          if multipart
            # Match anything for the rest of the url (multiple sections)

            # check that the splat is at the end of the url
            if index != (parts.size-1)
              raise "The splat (*) operator can only be used at the end of a url"
            end

            part = '**'
            index = (index..-1)
          else
            # Match anything in a single section, set the part to be '*'
            part = '*'
          end

          params[section_matcher] = index
        end

        node = (node[part] ||= {})
      end

      node[nil] = params
    end
def add_indirect_path(node, path, params)
      parts = url_parts(path)

      parts.each_with_index do |part, index|
        if has_binding?(part)
          # Strip off {{ and }}
          section_matcher, multipart = binding_extract(part)

          if multipart
            # Match anything for the rest of the url (multiple sections)

            # check that the splat is at the end of the url
            if index != (parts.size-1)
              raise "The splat (*) operator can only be used at the end of a url"
            end

            part = '**'
            index = (index..-1)
          else
            # Match anything in a single section, set the part to be '*'
            part = '*'
          end

          params[section_matcher] = index
        end

        node = (node[part] ||= {})
      end

      node[nil] = params
    end
Build up the @indirect_routes data structure.
 '*' means wildcard match anything
 nil means a terminal, who's value will be the params.

 In the params, an integer vaule means the index of the wildcard