/scalate-jruby/src/main/resources/haml-3.0.25/lib/sass/scss/script_lexer.rb

http://github.com/scalate/scalate · Ruby · 15 lines · 11 code · 1 blank · 3 comment · 1 complexity · e90b8cf989a13e8b09b7e388b56e8438 MD5 · raw file

  1. module Sass
  2. module SCSS
  3. # A mixin for subclasses of {Sass::Script::Lexer}
  4. # that makes them usable by {SCSS::Parser} to parse SassScript.
  5. # In particular, the lexer doesn't support `!` for a variable prefix.
  6. module ScriptLexer
  7. private
  8. def variable
  9. return [:raw, "!important"] if scan(Sass::SCSS::RX::IMPORTANT)
  10. _variable(/(\$)(#{Sass::SCSS::RX::IDENT})/)
  11. end
  12. end
  13. end
  14. end