haml-3.0.25.lib.sass.script.css_lexer.rb Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalate-jruby_2.10 Show documentation
Show all versions of scalate-jruby_2.10 Show documentation
Scalate integration with JRuby to access Ruby based filters such as sass
The newest version!
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
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
def important
return unless s = scan(IMPORTANT)
[:raw, s]
end
end
end
end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy