Fix function keyword syntax

Avoid matching "function" at the end of other words
Fix highlighting of scope keywords
This commit is contained in:
Joel Bennett 2015-11-23 00:57:36 -05:00
parent c7451c15d2
commit 4279850edf

View file

@ -522,7 +522,7 @@
<key>function</key>
<dict>
<key>begin</key>
<string>((?i:function|filter|configuration|workflow))\s+((?:\p{L}|\d|_|-|\.)+)</string>
<string>(?&lt;!\S)(?i)(function|filter|configuration|workflow)\s+(?:(global|local|script|private):)?((?:\p{L}|\d|_|-|\.)+)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
@ -538,7 +538,12 @@
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.function</string>
<string>storage.modifier.scope.powershell</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>entity.name.function.powershell</string>
</dict>
</dict>
<key>end</key>
@ -1178,4 +1183,4 @@
<key>uuid</key>
<string>f8f5ffb0-503e-11df-9879-0800200c9a66</string>
</dict>
</plist>
</plist>