class Sass::Script::CssLexer - sass-3.4.14 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 26
    def important
      s = scan(IMPORTANT)
      return unless s
      [: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
        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

token() click to toggle source
Calls superclass method

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