class Sass::Script::CssLexer - sass-3.2.19 Documentation

# class Sass::Script::CssLexer

This is a subclass of {Lexer} for use in parsing plain CSS properties.

@see Sass::SCSS::CssParser

### Private Instance Methods

important() click to toggle source

    # File lib/sass/script/css_lexer.rb, line 23
    def important
      return unless s = scan(IMPORTANT)
      [:raw, s]
    end

string(re, *args) click to toggle source

    # File lib/sass/script/css_lexer.rb, line 13
    def string(re, *args)
      if re == :uri
        return unless uri = scan(URI)
        return [:string, Script::String.new(uri)]
      end

      return unless scan(STRING)
      [:string, Script::String.new((@scanner[1] || @scanner[2]).gsub(/\(['"])/, '\1'), :string)]
    end

token() click to toggle source
Calls superclass method

    # File lib/sass/script/css_lexer.rb, line 9
    def token
      important || super
    end