aboutsummaryrefslogtreecommitdiff
path: root/lua/lexers/tcl.lua
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2023-08-11 01:27:32 +0200
committerRandy Palamar <randy@rnpnr.xyz>2024-03-27 06:04:21 -0600
commit4c4392d29df777ff702dfe99b4f3c23142976e05 (patch)
tree5355324abe18952f7d19d6cfc5dbeb5d6cb72b84 /lua/lexers/tcl.lua
parent95bf9f59f8a9a37148bdc0787db378d62c7cd032 (diff)
downloadvis-4c4392d29df777ff702dfe99b4f3c23142976e05.tar.gz
vis-4c4392d29df777ff702dfe99b4f3c23142976e05.tar.xz
update lexers to orbitalquark/scintillua@b789dde
Rather than cherry pick patches from after 6.2 we will just grab everything as is.
Diffstat (limited to 'lua/lexers/tcl.lua')
-rw-r--r--lua/lexers/tcl.lua7
1 files changed, 4 insertions, 3 deletions
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