module Cucumber::Parser::TreetopExt

def parse_file(file, options)

Parses a file and returns a Cucumber::Ast
def parse_file(file, options)
  _, path, lines = *FILE_COLON_LINE_PATTERN.match(file)
  if path
    lines = lines.split(':').map { |line| line.to_i }
  else
    path = file
  end
  filter = Filter.new(lines, options)
  loader = lambda { |io| parse_or_fail(io.read, filter, path) }
  feature = if path =~ /^http/
    require 'open-uri'
    open(path, &loader)
  else
    File.open(path, Cucumber.file_mode('r'), &loader) 
  end
  feature
end