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/lua.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lexlua/lua.lua') diff --git a/lexlua/lua.lua b/lexlua/lua.lua index 7c5a83de8..74d6ef653 100644 --- a/lexlua/lua.lua +++ b/lexlua/lua.lua @@ -32,7 +32,8 @@ local deprecated_func = token('deprecated_function', word_match[[ getfenv loadstring module setfenv unpack ]]) lex:add_rule('function', func + deprecated_func) -lex:add_style('deprecated_function', lexer.STYLE_FUNCTION .. {italics = true}) +lex:add_style( + 'deprecated_function', lexer.styles['function'] .. {italics = true}) -- Constants. lex:add_rule('constant', token(lexer.CONSTANT, word_match[[ @@ -102,8 +103,8 @@ local deprecated_library = token('deprecated_library', word_match[[ debug.getfenv debug.setfenv ]]) lex:add_rule('library', library + deprecated_library) -lex:add_style('library', lexer.STYLE_TYPE) -lex:add_style('deprecated_library', lexer.STYLE_TYPE .. {italics = true}) +lex:add_style('library', lexer.styles.type) +lex:add_style('deprecated_library', lexer.styles.type .. {italics = true}) -- Identifiers. lex:add_rule('identifier', token(lexer.IDENTIFIER, lexer.word)) @@ -119,7 +120,7 @@ local sq_str = lexer.range("'") local dq_str = lexer.range('"') lex:add_rule('string', token(lexer.STRING, sq_str + dq_str) + token('longstring', longstring)) -lex:add_style('longstring', lexer.STYLE_STRING) +lex:add_style('longstring', lexer.styles.string) -- Comments. local line_comment = lexer.to_eol('--') -- cgit v1.2.3