From be2b4322cbb398b33ee9641d04463b663c781e1a Mon Sep 17 00:00:00 2001 From: mitchell Date: Wed, 8 Jul 2020 10:18:42 -0400 Subject: lexlua: Convert uses of `lexer.STYLE_*` to `lexer.styles.*`. --- lexlua/wsf.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lexlua/wsf.lua') diff --git a/lexlua/wsf.lua b/lexlua/wsf.lua index dfa14b1eb..9c903349c 100644 --- a/lexlua/wsf.lua +++ b/lexlua/wsf.lua @@ -22,7 +22,7 @@ local identifier = (alpha + S('_-:.?')) * word_char^0 -- Elements. local element = token('element', '<' * P('/')^-1 * identifier) lex:add_rule('element', element) -lex:add_style('element', lexer.STYLE_KEYWORD) +lex:add_style('element', lexer.styles.keyword) -- Closing tags. local tag_close = token('element', P('/')^-1 * '>') @@ -31,7 +31,7 @@ lex:add_rule('tag_close', tag_close) -- Attributes. local attribute = token('attribute', identifier) * #(lexer.space^0 * '=') lex:add_rule('attribute', attribute) -lex:add_style('attribute', lexer.STYLE_TYPE) +lex:add_style('attribute', lexer.styles.type) local in_tag = P(function(input, index) local before = input:sub(1, index - 1) @@ -60,7 +60,7 @@ lex:add_rule('number', #lexer.digit * lexer.last_char_includes('=') * lex:add_rule('entity', token('entity', '&' * word_match[[ lt gt amp apos quot ]] * ';')) -lex:add_style('entity', lexer.STYLE_OPERATOR) +lex:add_style('entity', lexer.styles.operator) -- Fold points. local function disambiguate_lt(text, pos, line, s) -- cgit v1.2.3