Skip to content

Commit 382689e

Browse files
committed
Fixed missing keyword scope on handle assignment in namespace
1 parent b117170 commit 382689e

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

AngelScript.sublime-syntax

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,10 @@ contexts:
243243
set: expression
244244

245245
expression-has-namespace-accessor:
246-
- match: '{{identifier}}(?=::)'
247-
scope: entity.name.namespace
246+
- match: '(@)?({{identifier}})(?=::)'
247+
captures:
248+
1: keyword.other
249+
2: entity.name.namespace
248250
push:
249251
- match: '::'
250252
scope: punctuation.separator

syntax_test_stuff.as

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,17 @@ void bitstuff()
208208
}
209209
// <- punctuation.section.block.end
210210

211+
@Namespace::Object = Thing();
212+
// <- keyword.other
213+
// ^^^^^^^^^ entity.name.namespace
214+
// ^^ punctuation.separator
215+
// ^^^^^^ variable.other
216+
// ^ keyword.operator.assignment
217+
// ^^^^^ entity.name.function
218+
// ^ punctuation.section.parens.begin
219+
// ^ punctuation.section.parens.end
220+
// ^ punctuation.terminator
221+
211222
int x = SomeNamespace::SomeFunction();
212223
// <- storage.type
213224
// ^ variable.other

0 commit comments

Comments
 (0)