|
4 | 4 | "If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
5 | 5 | "Once accepted there, we are happy to receive an update request."
|
6 | 6 | ],
|
7 |
| - "version": "https://github.com/dotnet/csharp-tmLanguage/commit/525e628edad54c0f7aa15b015310df240803ea66", |
| 7 | + "version": "https://github.com/dotnet/csharp-tmLanguage/commit/29a37e5e2d66deefe5a06afad793a820871f4fdf", |
8 | 8 | "name": "C#",
|
9 | 9 | "scopeName": "source.cs",
|
10 | 10 | "patterns": [
|
|
4437 | 4437 | ]
|
4438 | 4438 | },
|
4439 | 4439 | "parameter": {
|
4440 |
| - "match": "(?x)\n(?:(?:\\b(ref|params|out|in|this)\\b)\\s+)?\n(?<type_name>\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)", |
| 4440 | + "match": "(?x)\n(?:(?:\\b(ref|params|out|in|this)\\b)\\s+)?\n(?<type_name>\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^()]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)", |
4441 | 4441 | "captures": {
|
4442 | 4442 | "1": {
|
4443 | 4443 | "name": "storage.modifier.$1.cs"
|
|
4800 | 4800 | "anonymous-method-expression": {
|
4801 | 4801 | "patterns": [
|
4802 | 4802 | {
|
4803 |
| - "begin": "(?x)\n((?:\\b(?:async|static)\\b\\s*)*)\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(=>)", |
| 4803 | + "begin": "(?x)\n((?:\\b(?:async|static)\\b\\s*)*)\n(?:\n (@?[_[:alpha:]][_[:alnum:]]*)\\b|\n (\\()\n (?<tuple>(?:[^()]|\\(\\g<tuple>\\))*)\n (\\))\n)\\s*\n(=>)", |
4804 | 4804 | "beginCaptures": {
|
4805 | 4805 | "1": {
|
4806 | 4806 | "patterns": [
|
|
4814 | 4814 | "name": "entity.name.variable.parameter.cs"
|
4815 | 4815 | },
|
4816 | 4816 | "3": {
|
4817 |
| - "name": "keyword.operator.arrow.cs" |
4818 |
| - } |
4819 |
| - }, |
4820 |
| - "end": "(?=\\)|;|}|,)", |
4821 |
| - "patterns": [ |
4822 |
| - { |
4823 |
| - "include": "#block" |
4824 |
| - }, |
4825 |
| - { |
4826 |
| - "include": "#ref-modifier" |
| 4817 | + "name": "punctuation.parenthesis.open.cs" |
4827 | 4818 | },
|
4828 |
| - { |
4829 |
| - "include": "#expression" |
4830 |
| - } |
4831 |
| - ] |
4832 |
| - }, |
4833 |
| - { |
4834 |
| - "begin": "(?x)\n((?:\\b(?:async|static)\\b\\s*)*)\n(?<tuple>\n \\(\n (?:[^()]|\\g<tuple>)*\n \\)\n)\\s*\n(=>)", |
4835 |
| - "beginCaptures": { |
4836 |
| - "1": { |
| 4819 | + "4": { |
4837 | 4820 | "patterns": [
|
4838 | 4821 | {
|
4839 |
| - "match": "async|static", |
4840 |
| - "name": "storage.modifier.$0.cs" |
4841 |
| - } |
4842 |
| - ] |
4843 |
| - }, |
4844 |
| - "2": { |
4845 |
| - "patterns": [ |
| 4822 | + "include": "#comment" |
| 4823 | + }, |
| 4824 | + { |
| 4825 | + "include": "#explicit-anonymous-function-parameter" |
| 4826 | + }, |
4846 | 4827 | {
|
4847 |
| - "include": "#lambda-parameter-list" |
| 4828 | + "include": "#implicit-anonymous-function-parameter" |
| 4829 | + }, |
| 4830 | + { |
| 4831 | + "include": "#default-argument" |
| 4832 | + }, |
| 4833 | + { |
| 4834 | + "include": "#punctuation-comma" |
4848 | 4835 | }
|
4849 | 4836 | ]
|
4850 | 4837 | },
|
4851 |
| - "3": { |
| 4838 | + "5": { |
| 4839 | + "name": "punctuation.parenthesis.close.cs" |
| 4840 | + }, |
| 4841 | + "6": { |
4852 | 4842 | "name": "keyword.operator.arrow.cs"
|
4853 | 4843 | }
|
4854 | 4844 | },
|
4855 |
| - "end": "(?=\\)|;|}|,)", |
| 4845 | + "end": "(?=[,;)}])", |
4856 | 4846 | "patterns": [
|
4857 | 4847 | {
|
4858 |
| - "include": "#block" |
| 4848 | + "include": "#intrusive" |
4859 | 4849 | },
|
4860 | 4850 | {
|
4861 |
| - "include": "#ref-modifier" |
| 4851 | + "begin": "(?={)", |
| 4852 | + "end": "(?=[,;)}])", |
| 4853 | + "patterns": [ |
| 4854 | + { |
| 4855 | + "include": "#block" |
| 4856 | + }, |
| 4857 | + { |
| 4858 | + "include": "#intrusive" |
| 4859 | + } |
| 4860 | + ] |
4862 | 4861 | },
|
4863 | 4862 | {
|
4864 |
| - "include": "#expression" |
| 4863 | + "begin": "\\b(ref)\\b|(?=\\S)", |
| 4864 | + "beginCaptures": { |
| 4865 | + "1": { |
| 4866 | + "name": "storage.modifier.ref.cs" |
| 4867 | + } |
| 4868 | + }, |
| 4869 | + "end": "(?=[,;)}])", |
| 4870 | + "patterns": [ |
| 4871 | + { |
| 4872 | + "include": "#expression" |
| 4873 | + } |
| 4874 | + ] |
4865 | 4875 | }
|
4866 | 4876 | ]
|
4867 | 4877 | },
|
4868 | 4878 | {
|
4869 |
| - "begin": "(?x)\n((?:\\b(?:async|static)\\b\\s*)*)\n(?:\\b(delegate)\\b\\s*)", |
| 4879 | + "begin": "(?x)\n((?:\\b(?:async|static)\\b\\s*)*)\n\\b(delegate)\\b\\s*", |
4870 | 4880 | "beginCaptures": {
|
4871 | 4881 | "1": {
|
4872 | 4882 | "patterns": [
|
|
4880 | 4890 | "name": "storage.type.delegate.cs"
|
4881 | 4891 | }
|
4882 | 4892 | },
|
4883 |
| - "end": "(?=\\)|;|}|,)", |
| 4893 | + "end": "(?<=})|(?=[,;)}])", |
4884 | 4894 | "patterns": [
|
4885 | 4895 | {
|
4886 |
| - "include": "#parenthesized-parameter-list" |
| 4896 | + "include": "#intrusive" |
| 4897 | + }, |
| 4898 | + { |
| 4899 | + "begin": "\\(", |
| 4900 | + "beginCaptures": { |
| 4901 | + "0": { |
| 4902 | + "name": "punctuation.parenthesis.open.cs" |
| 4903 | + } |
| 4904 | + }, |
| 4905 | + "end": "\\)", |
| 4906 | + "endCaptures": { |
| 4907 | + "0": { |
| 4908 | + "name": "punctuation.parenthesis.close.cs" |
| 4909 | + } |
| 4910 | + }, |
| 4911 | + "patterns": [ |
| 4912 | + { |
| 4913 | + "include": "#intrusive" |
| 4914 | + }, |
| 4915 | + { |
| 4916 | + "include": "#explicit-anonymous-function-parameter" |
| 4917 | + }, |
| 4918 | + { |
| 4919 | + "include": "#punctuation-comma" |
| 4920 | + } |
| 4921 | + ] |
4887 | 4922 | },
|
4888 | 4923 | {
|
4889 | 4924 | "include": "#block"
|
|
4892 | 4927 | }
|
4893 | 4928 | ]
|
4894 | 4929 | },
|
4895 |
| - "lambda-parameter-list": { |
4896 |
| - "begin": "\\(", |
4897 |
| - "beginCaptures": { |
4898 |
| - "0": { |
4899 |
| - "name": "punctuation.parenthesis.open.cs" |
4900 |
| - } |
4901 |
| - }, |
4902 |
| - "end": "\\)", |
4903 |
| - "endCaptures": { |
4904 |
| - "0": { |
4905 |
| - "name": "punctuation.parenthesis.close.cs" |
4906 |
| - } |
4907 |
| - }, |
4908 |
| - "patterns": [ |
4909 |
| - { |
4910 |
| - "include": "#comment" |
4911 |
| - }, |
4912 |
| - { |
4913 |
| - "include": "#attribute-section" |
4914 |
| - }, |
4915 |
| - { |
4916 |
| - "include": "#lambda-parameter" |
4917 |
| - }, |
4918 |
| - { |
4919 |
| - "include": "#punctuation-comma" |
4920 |
| - } |
4921 |
| - ] |
4922 |
| - }, |
4923 |
| - "lambda-parameter": { |
4924 |
| - "match": "(?x)\n(?:\\b(ref|out|in)\\b)?\\s*\n(?:(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+)?\n(\\g<identifier>)\\b\\s*\n(?=[,)])", |
| 4930 | + "explicit-anonymous-function-parameter": { |
| 4931 | + "match": "(?x)\n(?:\\b(ref|params|out|in)\\b\\s*)?\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args><(?:[^<>]|\\g<type_args>)*>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^()]|\\g<tuple>)*\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n\\b(\\g<identifier>)\\b", |
4925 | 4932 | "captures": {
|
4926 | 4933 | "1": {
|
4927 | 4934 | "name": "storage.modifier.$1.cs"
|
|
4938 | 4945 | }
|
4939 | 4946 | }
|
4940 | 4947 | },
|
| 4948 | + "implicit-anonymous-function-parameter": { |
| 4949 | + "match": "\\@?[_[:alpha:]][_[:alnum:]]*\\b", |
| 4950 | + "name": "entity.name.variable.parameter.cs" |
| 4951 | + }, |
| 4952 | + "default-argument": { |
| 4953 | + "begin": "=", |
| 4954 | + "beginCaptures": { |
| 4955 | + "0": { |
| 4956 | + "name": "keyword.operator.assignment.cs" |
| 4957 | + } |
| 4958 | + }, |
| 4959 | + "end": "(?=,|\\))", |
| 4960 | + "patterns": [ |
| 4961 | + { |
| 4962 | + "include": "#expression" |
| 4963 | + } |
| 4964 | + ] |
| 4965 | + }, |
4941 | 4966 | "type": {
|
4942 | 4967 | "patterns": [
|
4943 | 4968 | {
|
|
0 commit comments