1 -- Copyright 2006-2013 Robert Gieseke. See LICENSE.
2 -- Less CSS LPeg lexer.
5 local l
= require('lexer')
9 local M
= {_NAME
= 'less'}
12 local line_comment
= token(l
.COMMENT
, '//' * l
.nonnewline^
0)
15 local variable
= token(l
.VARIABLE
, '@' * (l
.alnum
+ S('_-{}'))^
1)
17 local css
= l
.load('css')
18 local _rules
= css
._rules
19 table.insert(_rules
, #_rules
- 1, {'line_comment', line_comment
})
20 table.insert(_rules
, #_rules
- 1, {'variable', variable
})
23 M
._tokenstyles
= css
._tokenstyles
25 M
._foldsymbols
= css
._foldsymbols