From 3751586e1fbf044fa798737e9c59a0235c5aaee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 25 Feb 2017 20:48:51 +0100 Subject: lexers: sync with scintillua changeset 594 rev 6e29a8d2a783 Stuff which was left out / our local changes include: - lexer.lua: different loading mechanism and style handling - ansi_c.lua: for now we keep the separate token definitions with references to the respective standards. This should highlight file names after #include directives. It will also treat simple, non-nested occurrences of #if 0 ... #endif as a comment. - pkgbuild.lua: the arch specific fields have been kept - all scintilla $(style variables) have been replaced --- lua/lexers/html.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'lua/lexers/html.lua') diff --git a/lua/lexers/html.lua b/lua/lexers/html.lua index 732dfa5..7d29881 100644 --- a/lua/lexers/html.lua +++ b/lua/lexers/html.lua @@ -112,6 +112,13 @@ M._tokenstyles = { doctype = l.STYLE_COMMENT } +M._foldsymbols = { + _patterns = {'', ''}, + element = {['<'] = 1, ['/>'] = -1, [''] = -1, [''] = -1} +} + -- Tags that start embedded languages. M.embed_start_tag = element * (ws^1 * attribute * ws^0 * equals * ws^0 * string)^0 * @@ -142,6 +149,9 @@ local js_start_rule = #(P('<') * script_element * end))) * M.embed_start_tag -- +local js_line_comment = '//' * (l.nonnewline_esc - js_end_rule)^0 +local js_block_comment = '/*' * (l.any - '*/' - js_end_rule)^0 * P('*/')^-1 +js._RULES['comment'] = token(l.COMMENT, js_line_comment + js_block_comment) l.embed_lexer(M, js, js_start_rule, js_end_rule) -- Embedded CoffeeScript. @@ -156,11 +166,4 @@ local cs_end_rule = #('') * M.embed_end_tag -- l.embed_lexer(M, cs, cs_start_rule, cs_end_rule) -M._foldsymbols = { - _patterns = {'', ''}, - element = {['<'] = 1, ['/>'] = -1, [''] = -1, [''] = -1} -} - return M -- cgit v1.2.3