class Cucumber::FeatureFile
def parse(step_mother, options)
If +options+ contains tags, the result will
Parses a file and returns a Cucumber::Ast
def parse(step_mother, options) filters = @lines || options.filters builder = Cucumber::Parser::GherkinBuilder.new filter_listener = Gherkin::Parser::FilterListener.new(builder, filters) parser = Gherkin::Parser::Parser.new(filter_listener, true, "root") lexer = Gherkin::I18nLexer.new(parser, false) begin lexer.scan(source) ast = builder.ast return nil if ast.nil? # Filter caused nothing to match ast.language = lexer.i18n_language ast.file = @path ast rescue Gherkin::LexingError => e e.message.insert(0, "#{@path}: ") raise e end end