Skip to content

Commit

Permalink
Inlcude the receiver in entity.name.function so that it shows up in t…
Browse files Browse the repository at this point in the history
…he symbol list.
  • Loading branch information
rsesek committed May 8, 2011
1 parent 97f8c44 commit c85768b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Syntaxes/Go.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,10 @@
<key>begin</key>
<string>(?x)
(func)\s*
(
(?: \( ((?:[\[\]\w\d\s,._*&amp;&lt;&gt;-]|(?:interface\{\}))*) \)\s+ ) # receiver variable declarations, in brackets
(?: ([[:alpha:]_][[:alnum:]_]*)? ) # name of function is optional
)
(?: \( ((?:[\[\]\w\d\s,._*&amp;&lt;&gt;-]|(?:interface\{\}))*)? \) ) # required braces for parameters (even if empty)
\s*
(?: \(? ((?:[\[\]\w\d\s,._*&amp;&lt;&gt;-]|(?:interface\{\}))*) \)? )? # optional return types, optionally within braces
Expand All @@ -541,19 +543,24 @@
<key>2</key>
<dict>
<key>name</key>
<string>variable.receiver.go</string>
<string>entity.name.function.go.full-name</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>entity.name.function.go</string>
<string>variable.receiver.go</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>variable.parameters.go</string>
<string>entity.name.function.go.name</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>variable.parameters.go</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>variable.return-types.go</string>
Expand Down

0 comments on commit c85768b

Please sign in to comment.