logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

sass.lua (549B)


  1. -- Copyright 2006-2024 Robert Gieseke. See LICENSE.
  2. -- Sass CSS preprocessor LPeg lexer.
  3. -- http://sass-lang.com
  4. local lexer = lexer
  5. local P, S = lpeg.P, lpeg.S
  6. local lex = lexer.new(..., {inherit = lexer.load('css')})
  7. -- Line comments.
  8. lex:add_rule('line_comment', lex:tag(lexer.COMMENT, lexer.to_eol('//')))
  9. -- Variables.
  10. lex:add_rule('variable', lex:tag(lexer.VARIABLE, '$' * (lexer.alnum + S('_-'))^1))
  11. -- Mixins.
  12. lex:add_rule('mixin', lex:tag(lexer.PREPROCESSOR, '@' * lexer.word))
  13. lexer.property['scintillua.comment'] = '//'
  14. return lex