Sha256: bb90b045f38ad3691f953114d6faa9c68bd16d280684b24aea96c9843a2d64e3

Contents?: true

Size: 1.61 KB

Versions: 111

Compression:

Stored size: 1.61 KB

Contents

module Regexp::Expression
  module Group
    class Base < Regexp::Expression::Subexpression
    end

    class Passive < Group::Base
      attr_writer :implicit

      def initialize(*)
        @implicit = false
        super
      end

      def implicit?
        @implicit
      end
    end

    class Absence < Group::Base; end
    class Atomic  < Group::Base; end
    # TODO: should split off OptionsSwitch in v3.0.0. Maybe even make it no
    # longer inherit from Group because it is effectively a terminal expression.
    class Options < Group::Base
      attr_accessor :option_changes

      def initialize_copy(orig)
        self.option_changes = orig.option_changes.dup
        super
      end

      def quantify(*args)
        if token == :options_switch
          raise Regexp::Parser::Error, 'Can not quantify an option switch'
        else
          super
        end
      end
    end

    class Capture < Group::Base
      attr_accessor :number, :number_at_level
      alias identifier number
    end

    class Named < Group::Capture
      attr_reader :name
      alias identifier name

      def initialize(token, options = {})
        @name = token.text[3..-2]
        super
      end

      def initialize_copy(orig)
        @name = orig.name.dup
        super
      end
    end

    class Comment < Group::Base
    end
  end

  module Assertion
    class Base < Regexp::Expression::Group::Base; end

    class Lookahead           < Assertion::Base; end
    class NegativeLookahead   < Assertion::Base; end

    class Lookbehind          < Assertion::Base; end
    class NegativeLookbehind  < Assertion::Base; end
  end
end

Version data entries

111 entries across 111 versions & 15 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.2/lib/regexp_parser/expression/classes/group.rb
regexp_parser-2.10.0 lib/regexp_parser/expression/classes/group.rb
regexp_parser-2.9.3 lib/regexp_parser/expression/classes/group.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.2/lib/regexp_parser/expression/classes/group.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.9.2/lib/regexp_parser/expression/classes/group.rb
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/group.rb
bison-0.1.0 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/expression/classes/group.rb
mlh-rubocop-config-1.0.3 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/expression/classes/group.rb
study_line-0.2.7 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/expression/classes/group.rb
study_line-0.2.6 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/expression/classes/group.rb
study_line-0.2.5 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/expression/classes/group.rb
study_line-0.2.4 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/expression/classes/group.rb
study_line-0.2.3 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/expression/classes/group.rb
study_line-0.2.2 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/expression/classes/group.rb
study_line-0.2.1 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/expression/classes/group.rb
study_line-0.2.0 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/expression/classes/group.rb
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/group.rb
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/group.rb
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/group.rb
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/group.rb