|
7277 | 7277 | (?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)? |
7278 | 7278 | ) |
7279 | 7279 | (?:\s*\.\s*\g<name_and_type_args>)* | # Are there any more names being dotted into? |
7280 | | - (?<tuple>\s*\((?:[^\(\)]|\g<tuple>)+\)) |
| 7280 | + (?<tuple>\s*\((?:[^()]|\g<tuple>)+\)) |
7281 | 7281 | ) |
7282 | 7282 | (?:\s*\?\s*)? # nullable suffix? |
7283 | 7283 | (?:\s* # array suffix? |
|
7903 | 7903 | <key>begin</key> |
7904 | 7904 | <string>(?x) |
7905 | 7905 | ((?:\b(?:async|static)\b\s*)*) |
7906 | | -(@?[_[:alpha:]][_[:alnum:]]*)\b\s* |
| 7906 | +(?: |
| 7907 | + (@?[_[:alpha:]][_[:alnum:]]*)\b| |
| 7908 | + (\() |
| 7909 | + (?<tuple>(?:[^()]|\(\g<tuple>\))*) |
| 7910 | + (\)) |
| 7911 | +)\s* |
7907 | 7912 | (=>)</string> |
7908 | 7913 | <key>beginCaptures</key> |
7909 | 7914 | <dict> |
|
7927 | 7932 | <key>3</key> |
7928 | 7933 | <dict> |
7929 | 7934 | <key>name</key> |
7930 | | - <string>keyword.operator.arrow.cs</string> |
7931 | | - </dict> |
7932 | | - </dict> |
7933 | | - <key>end</key> |
7934 | | - <string>(?=\)|;|}|,)</string> |
7935 | | - <key>patterns</key> |
7936 | | - <array> |
7937 | | - <dict> |
7938 | | - <key>include</key> |
7939 | | - <string>#block</string> |
7940 | | - </dict> |
7941 | | - <dict> |
7942 | | - <key>include</key> |
7943 | | - <string>#ref-modifier</string> |
7944 | | - </dict> |
7945 | | - <dict> |
7946 | | - <key>include</key> |
7947 | | - <string>#expression</string> |
| 7935 | + <string>punctuation.parenthesis.open.cs</string> |
7948 | 7936 | </dict> |
7949 | | - </array> |
7950 | | - </dict> |
7951 | | - <dict> |
7952 | | - <key>begin</key> |
7953 | | - <string>(?x) |
7954 | | -((?:\b(?:async|static)\b\s*)*) |
7955 | | -(?<tuple> |
7956 | | - \( |
7957 | | - (?:[^()]|\g<tuple>)* |
7958 | | - \) |
7959 | | -)\s* |
7960 | | -(=>)</string> |
7961 | | - <key>beginCaptures</key> |
7962 | | - <dict> |
7963 | | - <key>1</key> |
| 7937 | + <key>4</key> |
7964 | 7938 | <dict> |
7965 | 7939 | <key>patterns</key> |
7966 | 7940 | <array> |
7967 | 7941 | <dict> |
7968 | | - <key>match</key> |
7969 | | - <string>async|static</string> |
7970 | | - <key>name</key> |
7971 | | - <string>storage.modifier.$0.cs</string> |
| 7942 | + <key>include</key> |
| 7943 | + <string>#comment</string> |
| 7944 | + </dict> |
| 7945 | + <dict> |
| 7946 | + <key>include</key> |
| 7947 | + <string>#explicit-anonymous-function-parameter</string> |
7972 | 7948 | </dict> |
7973 | | - </array> |
7974 | | - </dict> |
7975 | | - <key>2</key> |
7976 | | - <dict> |
7977 | | - <key>patterns</key> |
7978 | | - <array> |
7979 | 7949 | <dict> |
7980 | 7950 | <key>include</key> |
7981 | | - <string>#lambda-parameter-list</string> |
| 7951 | + <string>#implicit-anonymous-function-parameter</string> |
| 7952 | + </dict> |
| 7953 | + <dict> |
| 7954 | + <key>include</key> |
| 7955 | + <string>#default-argument</string> |
| 7956 | + </dict> |
| 7957 | + <dict> |
| 7958 | + <key>include</key> |
| 7959 | + <string>#punctuation-comma</string> |
7982 | 7960 | </dict> |
7983 | 7961 | </array> |
7984 | 7962 | </dict> |
7985 | | - <key>3</key> |
| 7963 | + <key>5</key> |
| 7964 | + <dict> |
| 7965 | + <key>name</key> |
| 7966 | + <string>punctuation.parenthesis.close.cs</string> |
| 7967 | + </dict> |
| 7968 | + <key>6</key> |
7986 | 7969 | <dict> |
7987 | 7970 | <key>name</key> |
7988 | 7971 | <string>keyword.operator.arrow.cs</string> |
7989 | 7972 | </dict> |
7990 | 7973 | </dict> |
7991 | 7974 | <key>end</key> |
7992 | | - <string>(?=\)|;|}|,)</string> |
| 7975 | + <string>(?=[,;)}])</string> |
7993 | 7976 | <key>patterns</key> |
7994 | 7977 | <array> |
7995 | 7978 | <dict> |
7996 | 7979 | <key>include</key> |
7997 | | - <string>#block</string> |
| 7980 | + <string>#intrusive</string> |
7998 | 7981 | </dict> |
7999 | 7982 | <dict> |
8000 | | - <key>include</key> |
8001 | | - <string>#ref-modifier</string> |
| 7983 | + <key>begin</key> |
| 7984 | + <string>(?={)</string> |
| 7985 | + <key>end</key> |
| 7986 | + <string>(?=[,;)}])</string> |
| 7987 | + <key>patterns</key> |
| 7988 | + <array> |
| 7989 | + <dict> |
| 7990 | + <key>include</key> |
| 7991 | + <string>#block</string> |
| 7992 | + </dict> |
| 7993 | + <dict> |
| 7994 | + <key>include</key> |
| 7995 | + <string>#intrusive</string> |
| 7996 | + </dict> |
| 7997 | + </array> |
8002 | 7998 | </dict> |
8003 | 7999 | <dict> |
8004 | | - <key>include</key> |
8005 | | - <string>#expression</string> |
| 8000 | + <key>begin</key> |
| 8001 | + <string>\b(ref)\b|(?=\S)</string> |
| 8002 | + <key>beginCaptures</key> |
| 8003 | + <dict> |
| 8004 | + <key>1</key> |
| 8005 | + <dict> |
| 8006 | + <key>name</key> |
| 8007 | + <string>storage.modifier.ref.cs</string> |
| 8008 | + </dict> |
| 8009 | + </dict> |
| 8010 | + <key>end</key> |
| 8011 | + <string>(?=[,;)}])</string> |
| 8012 | + <key>patterns</key> |
| 8013 | + <array> |
| 8014 | + <dict> |
| 8015 | + <key>include</key> |
| 8016 | + <string>#expression</string> |
| 8017 | + </dict> |
| 8018 | + </array> |
8006 | 8019 | </dict> |
8007 | 8020 | </array> |
8008 | 8021 | </dict> |
8009 | 8022 | <dict> |
8010 | 8023 | <key>begin</key> |
8011 | 8024 | <string>(?x) |
8012 | 8025 | ((?:\b(?:async|static)\b\s*)*) |
8013 | | -(?:\b(delegate)\b\s*)</string> |
| 8026 | +\b(delegate)\b\s*</string> |
8014 | 8027 | <key>beginCaptures</key> |
8015 | 8028 | <dict> |
8016 | 8029 | <key>1</key> |
|
8032 | 8045 | </dict> |
8033 | 8046 | </dict> |
8034 | 8047 | <key>end</key> |
8035 | | - <string>(?=\)|;|}|,)</string> |
| 8048 | + <string>(?<=})|(?=[,;)}])</string> |
8036 | 8049 | <key>patterns</key> |
8037 | 8050 | <array> |
8038 | 8051 | <dict> |
8039 | 8052 | <key>include</key> |
8040 | | - <string>#parenthesized-parameter-list</string> |
| 8053 | + <string>#intrusive</string> |
| 8054 | + </dict> |
| 8055 | + <dict> |
| 8056 | + <key>begin</key> |
| 8057 | + <string>\(</string> |
| 8058 | + <key>beginCaptures</key> |
| 8059 | + <dict> |
| 8060 | + <key>0</key> |
| 8061 | + <dict> |
| 8062 | + <key>name</key> |
| 8063 | + <string>punctuation.parenthesis.open.cs</string> |
| 8064 | + </dict> |
| 8065 | + </dict> |
| 8066 | + <key>end</key> |
| 8067 | + <string>\)</string> |
| 8068 | + <key>endCaptures</key> |
| 8069 | + <dict> |
| 8070 | + <key>0</key> |
| 8071 | + <dict> |
| 8072 | + <key>name</key> |
| 8073 | + <string>punctuation.parenthesis.close.cs</string> |
| 8074 | + </dict> |
| 8075 | + </dict> |
| 8076 | + <key>patterns</key> |
| 8077 | + <array> |
| 8078 | + <dict> |
| 8079 | + <key>include</key> |
| 8080 | + <string>#intrusive</string> |
| 8081 | + </dict> |
| 8082 | + <dict> |
| 8083 | + <key>include</key> |
| 8084 | + <string>#explicit-anonymous-function-parameter</string> |
| 8085 | + </dict> |
| 8086 | + <dict> |
| 8087 | + <key>include</key> |
| 8088 | + <string>#punctuation-comma</string> |
| 8089 | + </dict> |
| 8090 | + </array> |
8041 | 8091 | </dict> |
8042 | 8092 | <dict> |
8043 | 8093 | <key>include</key> |
|
8047 | 8097 | </dict> |
8048 | 8098 | </array> |
8049 | 8099 | </dict> |
8050 | | - <key>lambda-parameter-list</key> |
8051 | | - <dict> |
8052 | | - <key>begin</key> |
8053 | | - <string>\(</string> |
8054 | | - <key>beginCaptures</key> |
8055 | | - <dict> |
8056 | | - <key>0</key> |
8057 | | - <dict> |
8058 | | - <key>name</key> |
8059 | | - <string>punctuation.parenthesis.open.cs</string> |
8060 | | - </dict> |
8061 | | - </dict> |
8062 | | - <key>end</key> |
8063 | | - <string>\)</string> |
8064 | | - <key>endCaptures</key> |
8065 | | - <dict> |
8066 | | - <key>0</key> |
8067 | | - <dict> |
8068 | | - <key>name</key> |
8069 | | - <string>punctuation.parenthesis.close.cs</string> |
8070 | | - </dict> |
8071 | | - </dict> |
8072 | | - <key>patterns</key> |
8073 | | - <array> |
8074 | | - <dict> |
8075 | | - <key>include</key> |
8076 | | - <string>#comment</string> |
8077 | | - </dict> |
8078 | | - <dict> |
8079 | | - <key>include</key> |
8080 | | - <string>#attribute-section</string> |
8081 | | - </dict> |
8082 | | - <dict> |
8083 | | - <key>include</key> |
8084 | | - <string>#lambda-parameter</string> |
8085 | | - </dict> |
8086 | | - <dict> |
8087 | | - <key>include</key> |
8088 | | - <string>#punctuation-comma</string> |
8089 | | - </dict> |
8090 | | - </array> |
8091 | | - </dict> |
8092 | | - <key>lambda-parameter</key> |
| 8100 | + <key>explicit-anonymous-function-parameter</key> |
8093 | 8101 | <dict> |
8094 | 8102 | <key>match</key> |
8095 | 8103 | <string>(?x) |
8096 | | -(?:\b(ref|out|in)\b)?\s* |
8097 | | -(?:(?<type_name> |
| 8104 | +(?:\b(ref|params|out|in)\b\s*)? |
| 8105 | +(?<type_name> |
8098 | 8106 | (?: |
8099 | 8107 | (?: |
8100 | 8108 | (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification |
8101 | 8109 | (?<name_and_type_args> # identifier + type arguments (if any) |
8102 | 8110 | \g<identifier>\s* |
8103 | | - (?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)? |
| 8111 | + (?<type_args><(?:[^<>]|\g<type_args>)*>\s*)? |
8104 | 8112 | ) |
8105 | 8113 | (?:\s*\.\s*\g<name_and_type_args>)* | # Are there any more names being dotted into? |
8106 | | - (?<tuple>\s*\((?:[^\(\)]|\g<tuple>)+\)) |
| 8114 | + (?<tuple>\s*\((?:[^()]|\g<tuple>)*\)) |
8107 | 8115 | ) |
8108 | 8116 | (?:\s*\?\s*)? # nullable suffix? |
8109 | 8117 | (?:\s* # array suffix? |
|
8115 | 8123 | \s* |
8116 | 8124 | )* |
8117 | 8125 | ) |
8118 | | -)\s+)? |
8119 | | -(\g<identifier>)\b\s* |
8120 | | -(?=[,)])</string> |
| 8126 | +)\s* |
| 8127 | +\b(\g<identifier>)\b</string> |
8121 | 8128 | <key>captures</key> |
8122 | 8129 | <dict> |
8123 | 8130 | <key>1</key> |
|
8142 | 8149 | </dict> |
8143 | 8150 | </dict> |
8144 | 8151 | </dict> |
| 8152 | + <key>implicit-anonymous-function-parameter</key> |
| 8153 | + <dict> |
| 8154 | + <key>match</key> |
| 8155 | + <string>\@?[_[:alpha:]][_[:alnum:]]*\b</string> |
| 8156 | + <key>name</key> |
| 8157 | + <string>entity.name.variable.parameter.cs</string> |
| 8158 | + </dict> |
| 8159 | + <key>default-argument</key> |
| 8160 | + <dict> |
| 8161 | + <key>begin</key> |
| 8162 | + <string>=</string> |
| 8163 | + <key>beginCaptures</key> |
| 8164 | + <dict> |
| 8165 | + <key>0</key> |
| 8166 | + <dict> |
| 8167 | + <key>name</key> |
| 8168 | + <string>keyword.operator.assignment.cs</string> |
| 8169 | + </dict> |
| 8170 | + </dict> |
| 8171 | + <key>end</key> |
| 8172 | + <string>(?=,|\))</string> |
| 8173 | + <key>patterns</key> |
| 8174 | + <array> |
| 8175 | + <dict> |
| 8176 | + <key>include</key> |
| 8177 | + <string>#expression</string> |
| 8178 | + </dict> |
| 8179 | + </array> |
| 8180 | + </dict> |
8145 | 8181 | <key>type</key> |
8146 | 8182 | <dict> |
8147 | 8183 | <key>patterns</key> |
|
0 commit comments