VS: Generalize CSharp /langversion flag mapping

Map the `/langversion:` flag followed by any value to a `LangVersion`
element with the specified value in the `.csproj` file.

Fixes: #22089
This commit is contained in:
Brad King
2021-04-21 10:18:07 -04:00
parent 57872e6d44
commit 11c0bfff89
6 changed files with 36 additions and 270 deletions

View File

@@ -363,52 +363,13 @@
},
{
"name": "LangVersion",
"switch": "langversion:ISO-1",
"switch": "langversion:",
"comment": "",
"value": "ISO-1",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:ISO-2",
"comment": "",
"value": "ISO-2",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:3",
"comment": "",
"value": "3",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:4",
"comment": "",
"value": "4",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:5",
"comment": "",
"value": "5",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:6",
"comment": "",
"value": "6",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:default",
"comment": "",
"value": "default",
"flags": []
"value": "",
"flags": [
"UserValue",
"UserRequired"
]
},
{
"name": "DelaySign",

View File

@@ -363,52 +363,13 @@
},
{
"name": "LangVersion",
"switch": "langversion:ISO-1",
"switch": "langversion:",
"comment": "",
"value": "ISO-1",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:ISO-2",
"comment": "",
"value": "ISO-2",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:3",
"comment": "",
"value": "3",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:4",
"comment": "",
"value": "4",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:5",
"comment": "",
"value": "5",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:6",
"comment": "",
"value": "6",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:default",
"comment": "",
"value": "default",
"flags": []
"value": "",
"flags": [
"UserValue",
"UserRequired"
]
},
{
"name": "DelaySign",

View File

@@ -363,52 +363,13 @@
},
{
"name": "LangVersion",
"switch": "langversion:ISO-1",
"switch": "langversion:",
"comment": "",
"value": "ISO-1",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:ISO-2",
"comment": "",
"value": "ISO-2",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:3",
"comment": "",
"value": "3",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:4",
"comment": "",
"value": "4",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:5",
"comment": "",
"value": "5",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:6",
"comment": "",
"value": "6",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:default",
"comment": "",
"value": "default",
"flags": []
"value": "",
"flags": [
"UserValue",
"UserRequired"
]
},
{
"name": "DelaySign",

View File

@@ -363,52 +363,13 @@
},
{
"name": "LangVersion",
"switch": "langversion:ISO-1",
"switch": "langversion:",
"comment": "",
"value": "ISO-1",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:ISO-2",
"comment": "",
"value": "ISO-2",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:3",
"comment": "",
"value": "3",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:4",
"comment": "",
"value": "4",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:5",
"comment": "",
"value": "5",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:6",
"comment": "",
"value": "6",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:default",
"comment": "",
"value": "default",
"flags": []
"value": "",
"flags": [
"UserValue",
"UserRequired"
]
},
{
"name": "DelaySign",

View File

@@ -363,52 +363,13 @@
},
{
"name": "LangVersion",
"switch": "langversion:ISO-1",
"switch": "langversion:",
"comment": "",
"value": "ISO-1",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:ISO-2",
"comment": "",
"value": "ISO-2",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:3",
"comment": "",
"value": "3",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:4",
"comment": "",
"value": "4",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:5",
"comment": "",
"value": "5",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:6",
"comment": "",
"value": "6",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:default",
"comment": "",
"value": "default",
"flags": []
"value": "",
"flags": [
"UserValue",
"UserRequired"
]
},
{
"name": "DelaySign",

View File

@@ -381,52 +381,13 @@
},
{
"name": "LangVersion",
"switch": "langversion:ISO-1",
"switch": "langversion:",
"comment": "",
"value": "ISO-1",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:ISO-2",
"comment": "",
"value": "ISO-2",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:3",
"comment": "",
"value": "3",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:4",
"comment": "",
"value": "4",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:5",
"comment": "",
"value": "5",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:6",
"comment": "",
"value": "6",
"flags": []
},
{
"name": "LangVersion",
"switch": "langversion:default",
"comment": "",
"value": "default",
"flags": []
"value": "",
"flags": [
"UserValue",
"UserRequired"
]
},
{
"name": "DelaySign",