Sha256: 3cf90374a64a757f62e58e33f27a8710ef82afcfd98731c86968c455b28a9887

Contents?: true

Size: 755 Bytes

Versions: 96

Compression:

Stored size: 755 Bytes

Contents

module Sass
  module Script
    # This is a subclass of {Lexer} for use in parsing plain CSS properties.
    #
    # @see Sass::SCSS::CssParser
    class CssLexer < Lexer
      private

      def token
        important || super
      end

      def string(re, *args)
        if re == :uri
          uri = scan(URI)
          return unless uri
          return [:string, Script::Value::String.new(uri)]
        end

        return unless scan(STRING)
        string_value = Sass::Script::Value::String.value(@scanner[1] || @scanner[2])
        value = Script::Value::String.new(string_value, :string)
        [:string, value]
      end

      def important
        s = scan(IMPORTANT)
        return unless s
        [:raw, s]
      end
    end
  end
end

Version data entries

96 entries across 93 versions & 9 rubygems

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/css_lexer.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/sass-3.7.4/lib/sass/script/css_lexer.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/sass-3.7.4/lib/sass/script/css_lexer.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/sass-3.7.4/lib/sass/script/css_lexer.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/sass-3.7.4/lib/sass/script/css_lexer.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/sass-3.7.4/lib/sass/script/css_lexer.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/sass-3.7.4/lib/sass/script/css_lexer.rb
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/sass-3.7.4/lib/sass/script/css_lexer.rb
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/sass-3.7.4/lib/sass/script/css_lexer.rb
zuora_connect_ui-0.8.1 vendor/ruby/2.6.0/gems/sass-3.7.4/lib/sass/script/css_lexer.rb
zuora_connect_ui-0.8.0 vendor/ruby/2.6.0/gems/sass-3.7.4/lib/sass/script/css_lexer.rb
zuora_connect_ui-0.7.1 vendor/ruby/2.6.0/gems/sass-3.7.4/lib/sass/script/css_lexer.rb
zuora_connect_ui-0.7.0 vendor/ruby/2.6.0/gems/sass-3.7.4/lib/sass/script/css_lexer.rb
sass-3.7.4 lib/sass/script/css_lexer.rb
brakeman-4.4.0 bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/css_lexer.rb
sass-3.7.3 lib/sass/script/css_lexer.rb
sass-3.7.2 lib/sass/script/css_lexer.rb
sass-3.7.1 lib/sass/script/css_lexer.rb
sass-3.7.0 lib/sass/script/css_lexer.rb
sass-3.6.0 lib/sass/script/css_lexer.rb