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.1.86 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.85 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.84 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.83 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.82 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.81 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.80 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.79 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.78 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.77 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.76 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.75 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.74 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.73 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.72 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.71 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.70 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.69 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.68 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb
harbr-0.1.67 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set/range.rb