From 382689e378dba90a803cf1d3383a58260d3acf10 Mon Sep 17 00:00:00 2001 From: Melissa Geels Date: Thu, 21 Nov 2019 16:21:22 +0100 Subject: [PATCH] Fixed missing keyword scope on handle assignment in namespace --- AngelScript.sublime-syntax | 6 ++++-- syntax_test_stuff.as | 11 +++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/AngelScript.sublime-syntax b/AngelScript.sublime-syntax index 72c3fe5..3650145 100644 --- a/AngelScript.sublime-syntax +++ b/AngelScript.sublime-syntax @@ -243,8 +243,10 @@ contexts: set: expression expression-has-namespace-accessor: - - match: '{{identifier}}(?=::)' - scope: entity.name.namespace + - match: '(@)?({{identifier}})(?=::)' + captures: + 1: keyword.other + 2: entity.name.namespace push: - match: '::' scope: punctuation.separator diff --git a/syntax_test_stuff.as b/syntax_test_stuff.as index 4afe8bf..006221e 100644 --- a/syntax_test_stuff.as +++ b/syntax_test_stuff.as @@ -208,6 +208,17 @@ void bitstuff() } // <- punctuation.section.block.end + @Namespace::Object = Thing(); + // <- keyword.other +// ^^^^^^^^^ entity.name.namespace + // ^^ punctuation.separator + // ^^^^^^ variable.other + // ^ keyword.operator.assignment + // ^^^^^ entity.name.function + // ^ punctuation.section.parens.begin + // ^ punctuation.section.parens.end + // ^ punctuation.terminator + int x = SomeNamespace::SomeFunction(); // <- storage.type // ^ variable.other