Skip to content

Commit f057e7a

Browse files
authored
Improve parameter type matching regex
Fixes (again) dotnet#657 as well as issues brought up in dotnet#670. - Corrects the order of type, template arguments, nullable type specification and array specifications. - Ensures array specification support all forms (simple arrays, multi-dimensional arrays, arrays of arrays).
1 parent b35157a commit f057e7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntaxes/csharp.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@
502502
]
503503
},
504504
"parameters": {
505-
"begin": "\\b(ref|params|out)?\\s*\\b([\\w?]+(?:\\s*\\[\\s*,?\\s*\\])?(?:\\s*<.*?>)?)\\s+(\\w+)\\s*(=)?",
505+
"begin": "\\b(ref|params|out)?\\s*\\b(\\w+(?:\\s*<.*?>)?(?:\\s*\\?)?(?:\\s*\\[.*?\\])?)\\s+(\\w+)\\s*(=)?",
506506
"beginCaptures": {
507507
"1": {
508508
"name": "storage.type.modifier.cs"

0 commit comments

Comments
 (0)