lib/cucumber/feature_file.rb
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
# Parses a file and returns a Cucumber::Ast
# If +options+ contains tags, the result will
# be filtered.
Parses a file and returns a Cucumber::Ast
If +options+ contains tags, the result will
be filtered.
Parses a file and returns a Cucumber :: Ast If + options + contains tags the result will be filtered .
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? 
        ast.language = lexer.i18n_language
        ast.file = @path
        ast
      rescue Gherkin::LexingError => e
        e.message.insert(0, "#{@path}: ")
        raise e
      end
    end
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? ast . language = lexer . i18n_language ast . file = @path ast rescue Gherkin :: LexingError => e e . message . insert ( 0 , "#{@path}: " ) raise e end end
Parses a file and returns a Cucumber::Ast
If +options+ contains tags, the result will
be filtered.
Parses a file and returns a Cucumber :: Ast If + options + contains tags the result will be filtered .
# Filter caused nothing to match
step_mother
options