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/latex.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lexlua/latex.lua') diff --git a/lexlua/latex.lua b/lexlua/latex.lua index bb2f70823..3f18601f6 100644 --- a/lexlua/latex.lua +++ b/lexlua/latex.lua @@ -25,23 +25,23 @@ local math_word = word_match[[ local math_begin_end = (P('begin') + P('end')) * P(' ')^0 * '{' * math_word * P('*')^-1 * '}' lex:add_rule('math', token('math', '$' + '\\' * (S('[]()') + math_begin_end))) -lex:add_style('math', lexer.STYLE_FUNCTION) +lex:add_style('math', lexer.styles['function']) -- LaTeX environments. lex:add_rule('environment', token('environment', '\\' * (P('begin') + P('end')) * P(' ')^0 * '{' * lexer.word * P('*')^-1 * '}')) -lex:add_style('environment', lexer.STYLE_KEYWORD) +lex:add_style('environment', lexer.styles.keyword) -- Sections. lex:add_rule('section', token('section', '\\' * word_match[[ part chapter section subsection subsubsection paragraph subparagraph ]] * P('*')^-1)) -lex:add_style('section', lexer.STYLE_CLASS) +lex:add_style('section', lexer.styles.class) -- Commands. lex:add_rule('command', token('command', '\\' * (lexer.alpha^1 + S('#$&~_^%{}')))) -lex:add_style('command', lexer.STYLE_KEYWORD) +lex:add_style('command', lexer.styles.keyword) -- Operators. lex:add_rule('operator', token(lexer.OPERATOR, S('&#{}[]'))) -- cgit v1.2.3