class Cucumber::FeatureFile
def parse(configuration_filters, tag_counts)
If +configuration_filters+ contains any filters, the result will
Parses a file and returns a Cucumber::Ast::Feature
def parse(configuration_filters, tag_counts) filters = @lines || configuration_filters builder = Cucumber::Parser::GherkinBuilder.new(@path) filter_formatter = filters.empty? ? builder : Gherkin::Formatter::FilterFormatter.new(builder, filters) tag_count_formatter = Gherkin::Formatter::TagCountFormatter.new(filter_formatter, tag_counts) parser = Gherkin::Parser::Parser.new(tag_count_formatter, true, "root", false) begin parser.parse(source, @path, 0) builder.language = parser.i18n_language builder.result rescue Gherkin::Lexer::LexingError, Gherkin::Parser::ParseError => e e.message.insert(0, "#{@path}: ") raise e end end