From 306fd52c65843702a2daa17d87ad98eaf8876b4a Mon Sep 17 00:00:00 2001 From: Martin Leduc <31558169+DecimalTurn@users.noreply.github.com> Date: Tue, 26 Nov 2024 05:55:37 +0000 Subject: [PATCH] Remove lookbehind --- syntaxes/tests/vba/other.bas | 2 +- syntaxes/vba.yaml-tmlanguage | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/syntaxes/tests/vba/other.bas b/syntaxes/tests/vba/other.bas index 6e30fde..38bd837 100644 --- a/syntaxes/tests/vba/other.bas +++ b/syntaxes/tests/vba/other.bas @@ -136,7 +136,7 @@ Private WithEvents app As Outlook.Application Event LogonCompleted(UserName as String) ' <----- keyword.other.vba -Sub Logon +Sub Logon() RaiseEvent LogonCompleted ("AntoineJan") ' ^^^^^^^^^^ keyword.other.vba End Sub diff --git a/syntaxes/vba.yaml-tmlanguage b/syntaxes/vba.yaml-tmlanguage index f016ebc..6dab222 100644 --- a/syntaxes/vba.yaml-tmlanguage +++ b/syntaxes/vba.yaml-tmlanguage @@ -39,9 +39,16 @@ repository: match: ^.* functions: - name: entity.name.function.vba - match: (?i:\b(?:(?<=(Call|Function|Sub) ))([a-zA-Z][a-zA-Z0-9_]*)\b)(?=\(\)?) - + name: testing.vba + begin: (?i:\b(Call|Function|Sub) ) + beginCaptures: + 1: + name: keyword.other.vba + patterns: + - name: entity.name.function.vba + match: (?i:\b([a-zA-Z][a-zA-Z0-9_]*)\b) + end: \( + keywords: patterns: - name: keyword.conditional.vba