<commit_before># Let the subclasses see the superclass
module Sass::Constant; class Literal; end; end; # :nodoc:

require 'sass/constant/string'
require 'sass/constant/number'
require 'sass/constant/color'

class Sass::Constant::Literal # :nodoc:
  # The regular expression matching numbers.
  NUMBER  = /^(-?\d*?\.?)(\d+)([\D\S]*)$/

  html_color_matcher = Sass::Constant::Color::HTML4_COLORS.keys.join '|'

  # The regular expression matching colors.
  COLOR = /^\# (?: [\da-f]{3} | [\da-f]{6} ) | #{html_color_matcher}/ix
  
  def self.parse(value)
    case value
      when NUMBER
        Sass::Constant::Number.new(value)
      when COLOR
        Sass::Constant::Color.new(value)
      else
        Sass::Constant::String.new(value)
    end
  end
  
  def initialize(value = nil)
    self.parse(value) if value
  end
  <commit_msg>Fix a minor issue with number parsing.<commit_after># Let the subclasses see the superclass
module Sass::Constant; class Literal; end; end; # :nodoc:

require 'sass/constant/string'
require 'sass/constant/number'
require 'sass/constant/color'

class Sass::Constant::Literal # :nodoc:
  # The regular expression matching numbers.
  NUMBER  = /^(-?\d*?\.?)(\d+)([^\d\s]*)$/

  html_color_matcher = Sass::Constant::Color::HTML4_COLORS.keys.join '|'

  # The regular expression matching colors.
  COLOR = /^\# (?: [\da-f]{3} | [\da-f]{6} ) | #{html_color_matcher}/ix
  
  def self.parse(value)
    case value
      when NUMBER
        Sass::Constant::Number.new(value)
      when COLOR
        Sass::Constant::Color.new(value)
      else
        Sass::Constant::String.new(value)
    end
  end
  
  def initialize(value = nil)
    self.parse(value) if value
  end
  
{'fraction_non_alphanumeric': 0.15547703180212014, 'fraction_numerical': 0.0035335689045936395, 'mean_word_length': 3.3341836734693877, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4911030', 'n_tokens_mistral': 599, 'n_tokens_neox': 583, 'n_words': 130}