diff options
Diffstat (limited to 'lexlua/css.lua')
| -rw-r--r-- | lexlua/css.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lexlua/css.lua b/lexlua/css.lua index c11833750..07061e223 100644 --- a/lexlua/css.lua +++ b/lexlua/css.lua @@ -44,7 +44,7 @@ lex:add_rule('property', token('property', word_match[[ transition transform box-shadow filter opacity resize word-break word-wrap box-sizing animation text-overflow ]])) -lex:add_style('property', lexer.STYLE_KEYWORD) +lex:add_style('property', lexer.styles.keyword) -- Values. lex:add_rule('value', token('value', word_match[[ @@ -82,7 +82,7 @@ lex:add_rule('value', token('value', word_match[[ -- CSS 3. flex row column ellipsis inline-block ]])) -lex:add_style('value', lexer.STYLE_CONSTANT) +lex:add_style('value', lexer.styles.constant) -- Functions. lex:add_rule('function', token(lexer.FUNCTION, word_match[[ @@ -121,7 +121,7 @@ lex:add_rule('color', token('color', word_match[[ steelblue tan teal thistle tomato transparent turquoise violet wheat white whitesmoke yellow yellowgreen ]] + '#' * xdigit * xdigit * xdigit * (xdigit * xdigit * xdigit)^-1)) -lex:add_style('color', lexer.STYLE_NUMBER) +lex:add_style('color', lexer.styles.number) -- Identifiers. local word = lexer.alpha * (lexer.alnum + S('_-'))^0 @@ -134,11 +134,11 @@ lex:add_rule('pseudoclass', ':' * token('pseudoclass', word_match[[ nth-last-child nth-last-of-type nth-of-type only-of-type only-child optional out-of-range read-only read-write required root target valid visited ]])) -lex:add_style('pseudoclass', lexer.STYLE_CONSTANT) +lex:add_style('pseudoclass', lexer.styles.constant) lex:add_rule('pseudoelement', '::' * token('pseudoelement', word_match[[ after before first-letter first-line selection ]])) -lex:add_style('pseudoelement', lexer.STYLE_CONSTANT) +lex:add_style('pseudoelement', lexer.styles.constant) -- Strings. local sq_str = lexer.range("'") @@ -153,7 +153,7 @@ local unit = token('unit', word_match[[ ch cm deg dpcm dpi dppx em ex grad Hz in kHz mm ms pc pt px q rad rem s turn vh vmax vmin vw ]]) -lex:add_style('unit', lexer.STYLE_NUMBER) +lex:add_style('unit', lexer.styles.number) lex:add_rule('number', token(lexer.NUMBER, lexer.digit^1) * unit^-1) -- Operators. @@ -163,7 +163,7 @@ lex:add_rule('operator', token(lexer.OPERATOR, S('~!#*>+=|.,:;()[]{}'))) lex:add_rule('at_rule', token('at_rule', P('@') * word_match[[ charset font-face media page import namespace keyframes ]])) -lex:add_style('at_rule', lexer.STYLE_PREPROCESSOR) +lex:add_style('at_rule', lexer.styles.preprocessor) -- Fold points. lex:add_fold_point(lexer.OPERATOR, '{', '}') |
