Sha256: 3e75d5efd393b779c9d05d7fa67c2e852f7f1e0ff08a0dd13ddb710d2edb535f

Contents?: true

Size: 428 Bytes

Versions: 111

Compression:

Stored size: 428 Bytes

Contents

module Regexp::Expression
  class CharacterSet < Regexp::Expression::Subexpression
    class Range < Regexp::Expression::Subexpression
      def ts
        (head = expressions.first) ? head.ts : @ts
      end

      def <<(exp)
        complete? and raise Regexp::Parser::Error,
          "Can't add more than 2 expressions to a Range"
        super
      end

      def complete?
        count == 2
      end
    end
  end
end

Version data entries

111 entries across 111 versions & 15 rubygems

Version Path
harbr-0.2.6 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.2.5 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.2.4 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.2.3 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
regexp_parser-2.9.0 lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.2.2 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.2.1 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.2.0 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.99 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.98 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.97 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.96 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.95 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.94 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.93 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.91 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.90 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.89 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.88 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.87 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb