class Cucumber::Core::Gherkin::Parser

def document(document)

def document(document)
  builder = AstBuilder.new(document.uri)
  parser = ::Gherkin::Parser::Parser.new(builder, true, "root", false)
  begin
    parser.parse(document.body, document.uri, 0)
    builder.language = parser.i18n_language
    receiver.feature builder.result
  rescue *PARSER_ERRORS => e
    raise Core::Gherkin::ParseError.new("#{document.uri}: #{e.message}")
  end
end

def done

def done
  receiver.done
  self
end