@@ -1789,6 +1789,20 @@ contexts:
17891789 scope : meta.generic.cs punctuation.definition.generic.end.cs
17901790 pop : 1
17911791 - include : type
1792+ - match : (?:(?:(?:(System)(\.))?(Text)(\.))?(RegularExpressions)(\.))?(Regex)(\.)(Match|IsMatch|Replace)(\()
1793+ scope : meta.function-call.cs
1794+ captures :
1795+ 1 : variable.other.cs
1796+ 2 : punctuation.accessor.dot.cs
1797+ 3 : variable.other.cs
1798+ 4 : punctuation.accessor.dot.cs
1799+ 5 : variable.other.cs
1800+ 6 : punctuation.accessor.dot.cs
1801+ 7 : support.type.cs
1802+ 8 : punctuation.accessor.dot.cs
1803+ 9 : variable.function.cs
1804+ 10 : meta.group.cs punctuation.section.group.begin.cs
1805+ push : [function_call_arguments, regex_arguments]
17921806 - match : ' ((?!{{reserved}}\b){{name}})\s*(\()'
17931807 scope : meta.function-call.cs
17941808 captures :
@@ -1986,6 +2000,20 @@ contexts:
19862000 pop : 1
19872001 - match : ' (?=\S)'
19882002 push : line_of_code_in
2003+ - match : (?:(?:(?:(System)(\.))?(Text)(\.))?(RegularExpressions)(\.))?(Regex)\s*(\()
2004+ captures :
2005+ 1 : variable.other.cs
2006+ 2 : punctuation.accessor.dot.cs
2007+ 3 : variable.other.cs
2008+ 4 : punctuation.accessor.dot.cs
2009+ 5 : variable.other.cs
2010+ 6 : punctuation.accessor.dot.cs
2011+ 7 : support.type.cs
2012+ 8 : meta.group.cs punctuation.section.group.begin.cs
2013+ set : [constructor_arguments, regex_arguments]
2014+ - match : \(
2015+ scope : meta.group.cs punctuation.section.group.begin.cs
2016+ set : [constructor_arguments, arguments]
19892017 - match : (?:\s*((\()\s*(\)))\s*)?(\{)
19902018 captures :
19912019 1 : meta.group.cs
@@ -2134,6 +2162,11 @@ contexts:
21342162 pop : 1
21352163 - include : immediately_pop
21362164
2165+ regex_arguments :
2166+ - match : (?=[@$]*")
2167+ push : regex_string
2168+ - include : arguments
2169+
21372170 arguments :
21382171 - match : (out)\s
21392172 captures :
@@ -2160,6 +2193,15 @@ contexts:
21602193 1 : variable.parameter.cs
21612194 2 : punctuation.separator.argument.value.cs
21622195 push : line_of_code_in
2196+ - include : semi_colon_before_close_paren
2197+ - match : (?=\S)
2198+ push :
2199+ - include : lambdas
2200+ - include : line_of_code_in_no_semicolon
2201+ - match : (?=[;)])
2202+ pop : 1
2203+
2204+ semi_colon_before_close_paren :
21632205 - match : ' ,'
21642206 scope : punctuation.separator.argument.cs
21652207 - match : (?=\))
@@ -2516,15 +2558,15 @@ contexts:
25162558 regex_string :
25172559 - match : ' "'
25182560 scope : meta.string.cs string.quoted.double.cs punctuation.definition.string.begin.cs
2519- embed : scope:source.regexp
2561+ embed : scope:source.regexp.cs
25202562 embed_scope : meta.string.cs string.quoted.double.cs source.regexp
25212563 escape : ' "'
25222564 escape_captures :
25232565 0 : meta.string.cs string.quoted.double.cs punctuation.definition.string.end.cs
25242566 pop : 1
25252567 - match : ' @"'
25262568 scope : meta.string.cs string.quoted.double.verbatim.cs punctuation.definition.string.begin.cs
2527- embed : scope:source.regexp
2569+ embed : scope:source.regexp.cs
25282570 embed_scope : meta.string.cs string.quoted.double.verbatim.cs source.regexp
25292571 escape : ' "'
25302572 escape_captures :
0 commit comments