Skip to content

Commit

Permalink
Fixed missing keyword scope on handle assignment in namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
codecat committed Nov 21, 2019
1 parent b117170 commit 382689e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 4 additions & 2 deletions AngelScript.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions syntax_test_stuff.as
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 382689e

Please sign in to comment.