From 1e7be13bb6e707605be2d4be52afdab8c5f1c237 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Sat, 8 Jun 2024 21:13:24 +0200 Subject: [PATCH] [Lexer] Add support for `\ProvidesExpl(Class|File)` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In addition to `\ProvidesExplPackage`, LaTeX3 also introduces `\ProvidesExplClass` and `\ProvidesExplFile`, which also have the effect of enabling LaTeX3 syntax. See the LaTeX 3 interfaces manual, § 2.1 ‘Using the LATEX3 modules’. --- src/nl/hannahsten/texifyidea/grammar/LatexLexer.flex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nl/hannahsten/texifyidea/grammar/LatexLexer.flex b/src/nl/hannahsten/texifyidea/grammar/LatexLexer.flex index 9dcb2cc55..08ead29df 100644 --- a/src/nl/hannahsten/texifyidea/grammar/LatexLexer.flex +++ b/src/nl/hannahsten/texifyidea/grammar/LatexLexer.flex @@ -80,7 +80,7 @@ END_TOKEN="\\end" COMMAND_IFNEXTCHAR=\\@ifnextchar. COMMAND_TOKEN=\\([a-zA-Z@]+|.|\r) COMMAND_TOKEN_LATEX3=\\([a-zA-Z@_:0-9]+|.|\r) // _ and : are only LaTeX3 syntax -LATEX3_ON=\\(ExplSyntaxOn|ProvidesExplPackage) +LATEX3_ON=\\(ExplSyntaxOn|ProvidesExplPackage|ProvidesExplClass|ProvidesExplFile) LATEX3_OFF=\\ExplSyntaxOff NEWENVIRONMENT=\\(re)?newenvironment // BeforeBegin/AfterEnd are from etoolbox, and just happen to also have two parameters where the second can contain loose \begin or \end