File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,14 @@ function(hljs) {
8686 ]
8787 } ;
8888
89+ var GENERIC_MODIFIER = {
90+ begin : "<" ,
91+ end : ">" ,
92+ contains : [
93+ { beginKeywords : "in out" } ,
94+ hljs . TITLE_MODE
95+ ]
96+ } ;
8997 var TYPE_IDENT_RE = hljs . IDENT_RE + '(<' + hljs . IDENT_RE + '(\\s*,\\s*' + hljs . IDENT_RE + ')*>)?(\\[\\])?' ;
9098
9199 return {
@@ -161,13 +169,16 @@ function(hljs) {
161169 } ,
162170 {
163171 className : 'function' ,
164- begin : '(' + TYPE_IDENT_RE + '\\s+)+' + hljs . IDENT_RE + '\\s*\\(' , returnBegin : true ,
172+ begin : '(' + TYPE_IDENT_RE + '\\s+)+' + hljs . IDENT_RE + '\\s*(\\<.+\\>)?\\s* \\(' , returnBegin : true ,
165173 end : / \s * [ { ; = ] / , excludeEnd : true ,
166174 keywords : KEYWORDS ,
167175 contains : [
168176 {
169- begin : hljs . IDENT_RE + '\\s*\\(' , returnBegin : true ,
170- contains : [ hljs . TITLE_MODE ] ,
177+ begin : hljs . IDENT_RE + '\\s*(\\<.+\\>)?\\s*\\(' , returnBegin : true ,
178+ contains : [
179+ hljs . TITLE_MODE ,
180+ GENERIC_MODIFIER
181+ ] ,
171182 relevance : 0
172183 } ,
173184 {
You can’t perform that action at this time.
0 commit comments