aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlua/html.lua
diff options
context:
space:
mode:
authormitchell <unknown>2020-07-08 10:18:42 -0400
committermitchell <unknown>2020-07-08 10:18:42 -0400
commitbe2b4322cbb398b33ee9641d04463b663c781e1a (patch)
tree0f4dd53dc49dfb2621e8c0ab196c7762230d842a /lexlua/html.lua
parent329559b74b483576a74d5f87eebf951bd12b9200 (diff)
downloadscintilla-mirror-be2b4322cbb398b33ee9641d04463b663c781e1a.tar.gz
lexlua: Convert uses of `lexer.STYLE_*` to `lexer.styles.*`.
Diffstat (limited to 'lexlua/html.lua')
-rw-r--r--lexlua/html.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/lexlua/html.lua b/lexlua/html.lua
index 5ce566750..787566949 100644
--- a/lexlua/html.lua
+++ b/lexlua/html.lua
@@ -17,7 +17,7 @@ lex:add_rule('comment', token(lexer.COMMENT, lexer.range('<!--', '-->')))
-- Doctype.
lex:add_rule('doctype', token('doctype',
lexer.range('<!' * word_match([[doctype]], true), '>')))
-lex:add_style('doctype', lexer.STYLE_COMMENT)
+lex:add_style('doctype', lexer.styles.comment)
-- Elements.
local single_element = token('single_element', '<' * P('/')^-1 * word_match([[
@@ -39,9 +39,9 @@ local unknown_element = token('unknown_element', '<' * P('/')^-1 *
(lexer.alnum + '-')^1)
local element = known_element + unknown_element
lex:add_rule('element', element)
-lex:add_style('single_element', lexer.STYLE_KEYWORD)
-lex:add_style('element', lexer.STYLE_KEYWORD)
-lex:add_style('unknown_element', lexer.STYLE_KEYWORD .. {italics = true})
+lex:add_style('single_element', lexer.styles.keyword)
+lex:add_style('element', lexer.styles.keyword)
+lex:add_style('unknown_element', lexer.styles.keyword .. {italics = true})
-- Closing tags.
local tag_close = token('element', P('/')^-1 * '>')
@@ -64,8 +64,8 @@ local known_attribute = token('attribute', word_match([[
local unknown_attribute = token('unknown_attribute', (lexer.alnum + '-')^1)
local attribute = (known_attribute + unknown_attribute) * #(lexer.space^0 * '=')
lex:add_rule('attribute', attribute)
-lex:add_style('attribute', lexer.STYLE_TYPE)
-lex:add_style('unknown_attribute', lexer.STYLE_TYPE .. {italics = true})
+lex:add_style('attribute', lexer.styles.type)
+lex:add_style('unknown_attribute', lexer.styles.type .. {italics = true})
-- TODO: performance is terrible on large files.
local in_tag = P(function(input, index)
@@ -92,7 +92,7 @@ lex:add_rule('number', #lexer.digit * lexer.last_char_includes('=') *
-- Entities.
lex:add_rule('entity', token('entity', '&' * (lexer.any - lexer.space - ';')^1 *
';'))
-lex:add_style('entity', lexer.STYLE_COMMENT)
+lex:add_style('entity', lexer.styles.comment)
-- Fold points.
local function disambiguate_lt(text, pos, line, s)