class Cucumber::Core::Gherkin::Parser

def document(document)

def document(document)
  parser        = ::Gherkin::Parser.new
  scanner       = ::Gherkin::TokenScanner.new(document.body)
  token_matcher = ::Gherkin::TokenMatcher.new(document.language)
  core_builder  = AstBuilder.new(document.uri)
  begin
    result = parser.parse(scanner, token_matcher)
    receiver.feature core_builder.feature(result)
  rescue *PARSER_ERRORS => e
    raise Core::Gherkin::ParseError.new("#{document.uri}: #{e.message}")
  end
end

def done

def done
  receiver.done
  self
end

def initialize(receiver)

def initialize(receiver)
  @receiver = receiver
end