From bb94e22d3423fe458de4bc9621379ddebb7fe7e3 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+orbitalquark@users.noreply.github.com> Date: Wed, 1 Oct 2025 12:30:00 +0200 Subject: lua/lexers: synchronization with new release scintillua_6.6 Bugfixes: - Fixed Pascal numeric literals. - Fixed folding of HTML/XML comments and XML processing instructions. - Fixed incorrectly highlighting '..' range operators between numbers. Changes: - Added Janet and todo.txt lexers. - Updated Python lexer to recognize t-strings. - Migrated ini and Dart lexers. - Updated org lexer word lists. --- lua/lexers/pascal.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lua/lexers/pascal.lua') diff --git a/lua/lexers/pascal.lua b/lua/lexers/pascal.lua index b0c9c8a..0435387 100644 --- a/lua/lexers/pascal.lua +++ b/lua/lexers/pascal.lua @@ -54,10 +54,14 @@ local pblock_comment = lexer.range('(*', '*)') lex:add_rule('comment', token(lexer.COMMENT, line_comment + bblock_comment + pblock_comment)) -- Numbers. -lex:add_rule('number', token(lexer.NUMBER, lexer.number * S('LlDdFf')^-1)) +local hex_num = '$' * lexer.xdigit^1 +local oct_num = '&' * lpeg.R('07')^1 +local bin_num = '%' * S('01')^1 +local integer = hex_num + oct_num + bin_num + lexer.integer +lex:add_rule('number', token(lexer.NUMBER, lexer.float + integer)) -- Operators. -lex:add_rule('operator', token(lexer.OPERATOR, S('.,;^@:=<>+-/*()[]'))) +lex:add_rule('operator', token(lexer.OPERATOR, '..' + S('.,;^@:=<>+-/*()[]'))) lexer.property['scintillua.comment'] = '//' -- cgit v1.2.3