Skip to content

Commit

Permalink
fixes #8 GotoSymbol for cfscript functions
Browse files Browse the repository at this point in the history
very basic support #functions should capture the full function
  • Loading branch information
atomi committed Jan 23, 2012
1 parent 0b726cc commit ca6d206
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
49 changes: 49 additions & 0 deletions Cfscript.tmLanguage
Expand Up @@ -30,6 +30,55 @@
<key>repository</key> <key>repository</key>
<dict> <dict>


<!-- functions -->
<key>functions</key>
<dict>
<key>begin</key>
<string>function\s(\w+)(\()</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.function.identifier.cfscript</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.function-parameters.begin.cfscript</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.function-parameters.end.cfscript</string>
</dict>
</dict>
<key>name</key>
<string>meta.function-call.cfscript</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>,</string>
<key>name</key>
<string>punctuation.definition.seperator.parameter.cfscript</string>
</dict>
<dict>
<key>include</key>
<string>#cfscript-code</string>
</dict>
</array>
</dict>
<!-- /functions -->




<key>cfscript</key> <key>cfscript</key>
<dict> <dict>
<key>patterns</key> <key>patterns</key>
Expand Down
19 changes: 19 additions & 0 deletions Symbol List - function.tmPreferences
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List Function</string>
<key>scope</key>
<string>source.cfscript meta.function.identifier</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>symbolTransformation</key>
<string>s/^/func: /</string>
</dict>
<key>uuid</key>
<string>98C0BD70-41E5-11E1-B86C-0800200C9A66</string>
</dict>
</plist>

0 comments on commit ca6d206

Please sign in to comment.