From 4c4392d29df777ff702dfe99b4f3c23142976e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Fri, 11 Aug 2023 01:27:32 +0200 Subject: update lexers to orbitalquark/scintillua@b789dde Rather than cherry pick patches from after 6.2 we will just grab everything as is. --- lua/lexers/tcl.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lua/lexers/tcl.lua') diff --git a/lua/lexers/tcl.lua b/lua/lexers/tcl.lua index 8686795..5552ed8 100644 --- a/lua/lexers/tcl.lua +++ b/lua/lexers/tcl.lua @@ -1,4 +1,4 @@ --- Copyright 2014-2022 Joshua Krämer. See LICENSE. +-- Copyright 2014-2024 Joshua Krämer. See LICENSE. -- Tcl LPeg lexer. -- This lexer follows the TCL dodekalogue (http://wiki.tcl.tk/10259). -- It is based on the previous lexer by Mitchell. @@ -16,7 +16,7 @@ lex:add_rule('whitespace', token(lexer.WHITESPACE, lexer.space^1)) lex:add_rule('comment', token(lexer.COMMENT, lexer.to_eol('#' * P(function(input, index) local i = index - 2 while i > 0 and input:find('^[ \t]', i) do i = i - 1 end - if i < 1 or input:find('^[\r\n;]', i) then return index end + if i < 1 or input:find('^[\r\n;]', i) then return true end end)))) -- Separator (semicolon). @@ -41,6 +41,7 @@ lex:add_rule('backslash', token(lexer.TYPE, '\\' * (oct + hex + unicode + 1))) -- Fold points. lex:add_fold_point(lexer.KEYWORD, '{', '}') -lex:add_fold_point(lexer.COMMENT, lexer.fold_consecutive_lines('#')) + +lexer.property['scintillua.comment'] = '#' return lex -- cgit v1.2.3