<commit_before>module Spec2
  module DSL
    include Matchers
    extend Matchers

    module Spec2___
      include ::Spec2::DSL

      def __spec2_before_hook
      end

      def __spec2_after_hook
      end

      def __spec2_run_lets!
      end

      def __spec2_clear_lets
      end
    end

    SPEC2_CONTEXT = ::Spec2::DSL::Spec2___
    SPEC2_FULL_CONTEXT = ":root"

    macro describe(what, file = __FILE__, line = __LINE__, &blk)
      {% if SPEC2_FULL_CONTEXT == ":root" %}
        module Spec2___Root
        @@__spec2_active_context : ::Spec2::Context
        @@__spec2_active_context = ::Spec2::Context.instance
        ::Spec2::DSL.context(
      {% else %}
        context(
      {% end %}
        {{what}}, {{file}}, {{line}}
      ) {{blk}}

      {% if SPEC2_FULL_CONTEXT == ":root" %}
        {{:end.id}}
      {% end %}
    end

    macro context(what, file = __FILE__, line = __LINE__, &blk)
      {% name = what.id.stringify.gsub(/[^\w]/, "_") %}
      {% name = ("Spec2__" + name.camelcase).id %}

      {% full_name = "#{SPEC2_FULL_CONTEXT.id} -> #{what.id} (#{file.id}:#{line.id})" %}

      %current_context = @@__spec2_active_context
      module {{name.id}}
        include {{SPEC2_CONTEXT}}

        {% unless ::Spec2::Context::DEFINED[full_name] == true %}
          SPEC2_FULL_CONTEXT = {{full_name}}
          SPEC2_CONTEXT = {{name.id}}
          LETS = {} of String => Int32
          LETS_BANG = {} of String => Int32
          BEFORES = [] of Int32
          AFTERS = [] of Int32
          ITS = {} of String => Int32
          {% ::Spec2::Context::DEFINED[full_name] = true %}
        {% end %}

        __spec2_sanity_checks({{name}}, {{full_name}})

        @@__spec2_active_context = ::Spec2::Context
          .new(%current_context, {{what}})

        (%current_context ||<commit_msg>Keep up with compiler<commit_after>module Spec2
  module DSL
    include Matchers
    extend Matchers

    module HasActiveContext
      macro included
        @@__spec2_active_context : ::Spec2::Context
        def self.__spec2_active_context
          @@__spec2_active_context
        end
      end
    end

    module Spec2___
      include ::Spec2::DSL
      include ::Spec2::DSL::HasActiveContext

      @@__spec2_active_context = ::Spec2::Context.instance

      def __spec2_before_hook
      end

      def __spec2_after_hook
      end

      def __spec2_run_lets!
      end

      def __spec2_clear_lets
      end
    end

    SPEC2_CONTEXT = ::Spec2::DSL::Spec2___
    SPEC2_FULL_CONTEXT = ":root"

    macro describe(what, file = __FILE__, line = __LINE__, &blk)
      {% if SPEC2_FULL_CONTEXT == ":root" %}
        module Spec2___Root
        @@__spec2_active_context : ::Spec2::Context
        @@__spec2_active_context = ::Spec2::Context.instance
        ::Spec2::DSL.context(
      {% else %}
        context(
      {% end %}
        {{what}}, {{file}}, {{line}}
      ) {{blk}}

      {% if SPEC2_FULL_CONTEXT == ":root" %}
        {{:end.id}}
      {% end %}
    end

    macro context(what, file = __FILE__, line = __LINE__, &blk)
      {% name = what.id.stringify.gsub(/[^\w]/, "_") %}
      {% name = ("Spec2__" + name.camelcase).id %}

      {% full_name = "#{SPEC2_FULL_CONTEXT.id} -> #{what.id} (#{file.id}:#{line.id})" %}

      %current_context = @@__spec2_active_context
      module {{name.id}}
        include {{SPEC2_CONTEXT}}
        include ::Spec2::DSL::HasActiveContext

        @@__spec2_active_context = ::Spec2::Context
          .new({{SPEC2_CONTEXT}}.__spec2_active_context, {{what}})

        {% unless ::Spec2::Context::DEFINED[full_name] == true %}
          SPEC2_FULL_CONTEXT = {{full_name}}
          SPEC2_CONTEXT = {{name.id}}
          LETS = {} of String => Int32
          LETS_BANG = {} of String => Int32
          BEFORES = [] of Int32
          AFTERS = [] of Int32
          ITS = {} of String => Int32
          {% ::Spec2::Context::DEFINED[full_name] = true %}
        {% end %}

        __spec2_sanity_checks({{name}}, {{full_name}})

        (%current_context ||
{'fraction_non_alphanumeric': 0.14585908529048208, 'fraction_numerical': 0.022249690976514216, 'mean_word_length': 2.3082583810302535, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7081399', 'n_tokens_mistral': 1408, 'n_tokens_neox': 1302, 'n_words': 253}