Permalink
Browse files

Update scope keyword

Highlight as statement
No highlighting deprecated scope local
Highlight scope parameter as storage class
  • Loading branch information...
1 parent 04a4801 commit 3cd51e2de7c9fa06a6a1c863102a77436088c7e8 @JesseKPhillips committed May 16, 2013
Showing with 7 additions and 7 deletions.
  1. +3 −5 syntax/d.vim
  2. +4 −2 tests/hybrid.d
View
@@ -98,7 +98,7 @@ syn keyword dScopeDecl public protected private export package
syn keyword dStatement debug return with
syn keyword dStatement function delegate __ctfe mixin macro __simd
syn keyword dStatement in out body
-syn keyword dStorageClass contained in out
+syn keyword dStorageClass contained in out scope
syn keyword dStorageClass inout ref lazy pure nothrow
syn keyword dStorageClass auto static override final abstract volatile
syn keyword dStorageClass __gshared __vector
@@ -142,9 +142,6 @@ syn match dVersion "[^.]\<version\>"hs=s+1 nextgroup=dVersionInside
syn match dVersion "^\<version\>" nextgroup=dVersionInside
syn match dVersionInside "\s*([_a-zA-Z][_a-zA-Z0-9]*\>" transparent contained contains=dVersionIdentifier
-" Scope StorageClass
-syn match dStorageClass "\<scope\>"
-
" Traits Expression
syn match dStatement "\<__traits\>"
@@ -154,7 +151,8 @@ syn match dStatement "\<pragma\>"
syn match dExternal "\<extern\>"
" Scope Identifiers
-syn match dScope "\<scope\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+5 contains=dScopeIdentifier
+syn match dStatement "\<scope\>"
+syn match dStatement "\<scope\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+5 contains=dScopeIdentifier
" Traits Identifiers
syn match dTraits "\<__traits\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+8 contains=dTraitsIdentifier
View
@@ -10,5 +10,7 @@ in {
return "bye";
}
-void bar(string a, string file = __FILE__)
-if(typeof(a) : string) {}
+void bar(scope string a, string file = __FILE__)
+if(typeof(a) : string) {
+ scope(exit) destroy(n);
+}

0 comments on commit 3cd51e2

Please sign in to comment.