   end
 
   def process_line("Feature: " <> name = line, {feature, parser_state}) do
-    feature_tags = case parser_state do
-      %{tags: tags} -> tags
-      _             -> []
-    end
-
+    feature_tags = tags_from_state(parser_state)
     log line
     {%{feature | name: rstrip(name), tags: feature_tags}, :feature_description}
   end


  def process_line("Scenario: " <> name = line, {feature = %{scenarios: previous_scenarios}, parser_state}) do
    log line
    scenario_tags = case parser_state do
      %{tags: tags} -> tags
      _             -> []
    end
    new_scenario = %Scenario{name: name, tags: scenario_tags}
    {%{feature | scenarios: [new_scenario | previous_scenarios]}, :scenario_steps}
  end

    Logger.debug("Parsing line: \"#{line}\"")
  end

  defp tags_from_state(parser_state) do
    case parser_state do
      %{tags: tags} -> tags
      _             -> []
    end
  end

end
