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/prolog.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lua/lexers/prolog.lua') diff --git a/lua/lexers/prolog.lua b/lua/lexers/prolog.lua index 53e25c8..b595fcc 100644 --- a/lua/lexers/prolog.lua +++ b/lua/lexers/prolog.lua @@ -1,4 +1,4 @@ --- Copyright 2006-2022 Mitchell. See LICENSE. +-- Copyright 2006-2024 Mitchell. See LICENSE. -- Lexer enhanced to conform to the realities of Prologs on the ground by -- Michael T. Richter. Copyright is explicitly assigned back to Mitchell. -- Prolog LPeg lexer. @@ -30,9 +30,8 @@ local P, S = lpeg.P, lpeg.S local lex = lexer.new('prolog') -local dialects = setmetatable({gprolog = 'gprolog', swipl = 'swipl'}, - {__index = function(_, _) return 'iso' end}) -local dialect = dialects[lexer.property['prolog.dialect']] +local dialect = lexer.property['prolog.dialect'] +if dialect ~= 'gprolog' and dialog ~= 'swipl' then dialect = 'iso' end -- Directives. local directives = {} @@ -350,4 +349,6 @@ local sq_str = lexer.range("'", true) local dq_str = lexer.range('"', true) lex:add_rule('string', token(lexer.STRING, sq_str + dq_str)) +lexer.property['scintillua.comment'] = '%' + return lex -- cgit v1.2.3