Skip to content

Add support for target typed conditional expression #1071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 262 commits into
base: draft-v9
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
262 commits
Select commit Hold shift + click to select a range
cf8b7b6
[create-pull-request] automated change (#972)
github-actions[bot] Oct 27, 2023
2fb8425
Combine merge tools (#977)
BillWagner Oct 31, 2023
62af002
Address typo in type inference
Nigel-Ecma Oct 30, 2023
3ba6223
I found a new way to break github :-)
Nigel-Ecma Oct 30, 2023
9965cce
Fix editorial nits (#964)
RexJaeschke Nov 1, 2023
ff43a49
Reverse some V7 edits w.r.t Indexers (#970)
RexJaeschke Nov 1, 2023
720d921
Fixes #987 (#993)
Nigel-Ecma Nov 16, 2023
b06e08b
Update our tools to run on >NET 8 (#996)
BillWagner Nov 22, 2023
2833c15
Install .NET 6.0 when running tests
jskeet Nov 22, 2023
1b8e8c3
Fix sole remaining example test failure
jskeet Nov 22, 2023
d901dfb
Fix NRT warnings in Word converter
jskeet Nov 24, 2023
02ec8c5
Create Tasks-to-Produce-a-Word-Spec-for-Ecma.md (#1014)
RexJaeschke Nov 28, 2023
defb608
Update README.md (#1015)
RexJaeschke Nov 29, 2023
4f8255d
Add example of compile-time error
BillWagner Nov 24, 2023
37741bb
respond to feedback
BillWagner Nov 27, 2023
ac40ad6
Add example for unreachable code
BillWagner Nov 24, 2023
ee25423
respond to feedback
BillWagner Nov 27, 2023
5e21fa7
Remove redundant (and incomplete) description of array element checking
jskeet Nov 23, 2023
1f30416
Improve existing wording
jskeet Nov 29, 2023
0409dfa
Update standard/expressions.md
jskeet Nov 29, 2023
b650010
meeting commentary (#1017)
BillWagner Nov 29, 2023
5cc72ce
Delete duplicated Note in §6.2.5
Nigel-Ecma Nov 24, 2023
591bd27
Add note for the purpose of input parameters
jskeet Nov 23, 2023
dc288d9
Clarify that optional/required isn't relevant in ctor or indexer sign…
jskeet Nov 23, 2023
00cba6e
Wordsmithing return by ref (#1006)
BillWagner Nov 29, 2023
4f575da
Link sections on `throw` and handling exceptions (#1005)
BillWagner Nov 29, 2023
666572d
Tweaks to exception details
jskeet Nov 29, 2023
c469a5d
Correct ID string for generic elements
BillWagner Nov 22, 2023
91c5179
Fix array encoding
BillWagner Nov 22, 2023
dfb6882
Add name attribute to param tags
BillWagner Nov 22, 2023
3ffff34
Address nit
BillWagner Nov 22, 2023
12bf7ec
Update standard/documentation-comments.md
gafter Nov 29, 2023
ddddf3e
Add a note for the surprising nature of switch scopes
jskeet Nov 22, 2023
90d8649
[create-pull-request] automated change (#1016)
github-actions[bot] Nov 29, 2023
04e8816
Change block/statement/expression body not to be definitions (#1019)
jskeet Nov 30, 2023
0e69b5e
Fix overload resolution for non-returning async lambdas matching task…
jskeet Nov 30, 2023
8a81baa
Update remaining tools (#1023)
BillWagner Nov 30, 2023
38d9fe5
Fix codefence
333fred Nov 30, 2023
4d398ce
Add example annotation to 3 new examples (#1025)
RexJaeschke Nov 30, 2023
29e86c5
Create/Update V9 Feature Tracker Status (#976)
RexJaeschke Jan 9, 2024
2239f60
Introduce term "identity convertible" for types that aren't the same …
BillWagner Jan 10, 2024
feaeb0f
Add extra example in switch/case
jskeet Nov 30, 2023
2e0ce29
Redirect link to normative text
RexJaeschke Jan 2, 2024
e202391
fix md formatting
RexJaeschke Jan 2, 2024
268df1b
[create-pull-request] automated change (#1033)
github-actions[bot] Jan 10, 2024
642ff16
Make AsyncMethodBuilder a reserved attribute (#1035)
RexJaeschke Jan 11, 2024
9af5bda
[create-pull-request] automated change (#1036)
github-actions[bot] Jan 11, 2024
490d540
Small typo fix
333fred Jan 30, 2024
500ed09
Fix lint errors for tables.
jskeet Feb 7, 2024
03c5cdf
Address async issues (#1027)
BillWagner Feb 7, 2024
1956489
Update cancelled => canceled
jskeet Feb 7, 2024
a859ac4
Create general by-reference clause (#1028)
BillWagner Feb 7, 2024
66797ae
[create-pull-request] automated change (#1041)
github-actions[bot] Feb 7, 2024
ed6c7be
async "does not return a value" (#1043)
BillWagner Feb 8, 2024
6ce4846
add org -level app keys
BillWagner Feb 8, 2024
80b7cd7
add single issue config
BillWagner Feb 8, 2024
1f6488c
Update dependencies on the word converter (#1045)
BillWagner Feb 12, 2024
3b39ca3
Implement Dependabot (#1049)
BillWagner Feb 13, 2024
3bbcb7d
Remove unused table generation methods
jskeet Feb 12, 2024
ee38c3f
Bump the dotnet group in /tools with 2 updates
dependabot[bot] Feb 21, 2024
05dfbb3
Update v8-feature-tracker.md (#1057)
RexJaeschke Mar 13, 2024
d11d5a1
Add write perms (#1059)
BillWagner Mar 14, 2024
4bba1b8
Make sentence a new para. (#1061)
RexJaeschke Mar 21, 2024
cbf3a0d
Fix examples where feasible
jskeet Mar 27, 2024
c28682e
Tweak CLI wording
Nigel-Ecma Mar 5, 2024
8fc0c3c
Update standard/introduction.md
jskeet Mar 6, 2024
7132f70
Update standard/introduction.md
Nigel-Ecma Mar 27, 2024
5c802bc
Add support for static local functions (#869) (#1066)
BillWagner Mar 28, 2024
7ae35e3
Fix escape sequence examples which were missing backslash (#1065)
jskeet Mar 28, 2024
395573c
[create-pull-request] automated change (#1068)
github-actions[bot] Mar 28, 2024
6e2f18d
Tweak example annotation (#1069)
RexJaeschke Mar 30, 2024
2ff4fdd
support-target-typed-conditional-expression
RexJaeschke Apr 4, 2024
89f9fd8
support-target-typed-conditional-expression
RexJaeschke Apr 4, 2024
7ad52c6
Make heading consistent with other named operators (#1075)
RexJaeschke Apr 9, 2024
b6b2f00
[create-pull-request] automated change (#1076)
github-actions[bot] Apr 9, 2024
f9f87cb
Fix grammar rule name spelling (#1081)
RexJaeschke Apr 15, 2024
93b498e
Correct the spelling and format of accessor-related term usage (#1077)
RexJaeschke Apr 15, 2024
9d58b81
Correct README.md (#1082)
RexJaeschke Apr 15, 2024
50129d1
Bump the dotnet group in /tools with 5 updates (#1083)
dependabot[bot] Apr 17, 2024
0d708b8
[v8] Annex B: add 'mechanism by which linkage to an external method i…
jkrejcha Apr 22, 2024
ac78501
Removed duplicated text
ASidiq Apr 28, 2024
bae08bc
Fix typo in structs.md (#1095)
ericmutta Apr 29, 2024
a27664d
Format the `as` operator in monospace
pfusik Apr 30, 2024
5633a08
Change to secretless authentication (#1098)
BillWagner Apr 30, 2024
f56dccb
consolidate System member sets (#1100)
RexJaeschke May 2, 2024
aec7573
Bump the dotnet group in /tools with 2 updates (#1101)
dependabot[bot] May 2, 2024
ff77f03
Disable one lint rule in custom table. (#1102)
BillWagner May 2, 2024
e7c264f
enable nullable annotations (#1106)
BillWagner May 15, 2024
8c5e008
Fix explicit interface example (#1112)
jskeet May 16, 2024
53421d5
allow long-form Unicode escape sequence (#1114)
RexJaeschke May 24, 2024
2ae7d3b
Fix #1109 (#1110)
Nigel-Ecma May 24, 2024
13b8009
Bump Microsoft.NET.Test.Sdk in /tools in the dotnet group (#1116)
dependabot[bot] May 24, 2024
d67b599
[create-pull-request] automated change (#1117)
github-actions[bot] May 24, 2024
1ba5991
Minor editorial tweaks to the Attributes chapter (#1119)
RexJaeschke May 28, 2024
3f12580
Bump the dotnet group in /tools with 2 updates (#1122)
dependabot[bot] May 30, 2024
cc98ec7
replace with correct grammar rule (#1126)
RexJaeschke Jun 6, 2024
ebf2058
Make precise the description of semicolons as property/indexer access…
RexJaeschke Jun 10, 2024
d7dddb1
Update classes.md
Nigel-Ecma Jun 24, 2024
4ecb750
[create-pull-request] automated change (#1133)
github-actions[bot] Jun 24, 2024
6bcec3b
Use Check Runs API to report on status checks (success and failures) …
BillWagner Jun 24, 2024
3202f19
Add Support for Name shadowing (#608)
RexJaeschke Jun 24, 2024
6dcbde0
Update dependencies, plus merge fix (#1134)
BillWagner Jun 24, 2024
092b916
Add status checks to the word converter (#1136)
BillWagner Jun 27, 2024
4c9ee4f
Bump Octokit from 12.0.0 to 13.0.0 in /tools in the dotnet group (#1137)
dependabot[bot] Jun 27, 2024
06d73f4
Add xref links to various conversion-related bullet lists (#1140)
RexJaeschke Jul 8, 2024
f69574e
Update quest-config.json (#1141)
adegeo Jul 9, 2024
1ca063e
Update quest-config.json (#1142)
adegeo Jul 9, 2024
8fac1a4
Preprocessor symbols for nullable reference types: Define a single nu…
BillWagner Jul 10, 2024
d1068b8
[create-pull-request] automated change (#1145)
github-actions[bot] Jul 10, 2024
c4ad003
Bump the dotnet group across 1 directory with 4 updates (#1144)
dependabot[bot] Jul 10, 2024
bbf50fb
Improve `attribute_argument` grammar (#1139)
Nigel-Ecma Jul 11, 2024
d1dd34f
[create-pull-request] automated change (#1147)
github-actions[bot] Jul 11, 2024
daa4d88
Fix PP_Nullable (#1148)
Nigel-Ecma Jul 11, 2024
34b4cb5
[create-pull-request] automated change (#1149)
github-actions[bot] Jul 11, 2024
878ce36
Move types from C.2 to C.3 (#1150)
RexJaeschke Aug 12, 2024
a18121f
Reserve operator method names (#1104)
RexJaeschke Aug 12, 2024
72455aa
remove sequester workflows (#1161)
BillWagner Aug 16, 2024
60ca80e
[create-pull-request] automated change (#1154)
github-actions[bot] Aug 21, 2024
a9257fc
Bump the dotnet group across 1 directory with 4 updates (#1162)
dependabot[bot] Aug 21, 2024
dd40c16
Remove '>' from sequence of tokens disambiguating type_argument_list …
Nigel-Ecma Aug 23, 2024
878dc0b
Change all “implementation-specific” to “implementation-defined” (#1168)
RexJaeschke Sep 9, 2024
3c3f169
Remove all "formal" in the context of "formal parameter" (#1170)
RexJaeschke Sep 11, 2024
d2a47d8
Use consistent terminology for parameter kinds (#1172)
RexJaeschke Sep 16, 2024
d93a724
[create-pull-request] automated change (#1173)
github-actions[bot] Sep 16, 2024
5e4deb2
Bump Microsoft.NET.Test.Sdk in /tools in the dotnet group (#1171)
dependabot[bot] Sep 16, 2024
1d16ec2
Consolidate parameter-kinds text w.r.t Variables and Classes clauses …
RexJaeschke Sep 16, 2024
9f8d893
enhance trace-back message (#1175)
RexJaeschke Sep 17, 2024
149297d
Misplaced question mark for nullable value type conversion (#1176)
jcouv Sep 17, 2024
874bfc9
Update antlr test harness (#1177)
BillWagner Sep 18, 2024
cb65205
Remove dynamic conversion from explicit reference conversions (#1180)
jcouv Sep 25, 2024
dbb527c
Bump xunit in /tools in the dotnet group across 1 directory (#1182)
dependabot[bot] Oct 2, 2024
a23bd55
Remove explicit dynamic conversions (#1184)
BillWagner Oct 3, 2024
f095786
[create-pull-request] automated change (#1185)
github-actions[bot] Oct 3, 2024
0e44170
Add status checks to the test runner (#1179)
BillWagner Oct 4, 2024
fc1d698
Bump System.Text.Json from 8.0.4 to 8.0.5 in /tools/Utilities
dependabot[bot] Oct 9, 2024
64cfcec
Different reference types: nullable and non-nullable (#1124)
BillWagner Oct 9, 2024
98c940b
move from C.2 to C.3 (#1183)
RexJaeschke Oct 9, 2024
2be6531
[create-pull-request] automated change (#1187)
github-actions[bot] Oct 9, 2024
56f724d
Null-forgiving operator
Nigel-Ecma Oct 31, 2024
dcd7eed
Null-forgiving operator
Nigel-Ecma Oct 31, 2024
6d08166
Delete link verifier (#1198)
BillWagner Nov 8, 2024
6b8ec80
Updated & extended spec for null-forgiving expressions:
Nigel-Ecma Nov 9, 2024
94c967e
Fixed MD lint issues
Nigel-Ecma Nov 9, 2024
6a248ad
Undoing changes made assuming PR #1178 was merged, it isn’t.
Nigel-Ecma Nov 10, 2024
636c182
Update types.md (#1199)
Nigel-Ecma Nov 10, 2024
f433b93
Some formatting and editorial nits (#1200)
RexJaeschke Nov 10, 2024
0a611d0
Update v8-feature-tracker.md (#1201)
RexJaeschke Nov 10, 2024
773fdb8
Fix typos (#1202)
RexJaeschke Nov 11, 2024
bd54cdb
Update Foreword for V8 (#1204)
RexJaeschke Nov 14, 2024
3372a08
Remove old version
BillWagner Nov 14, 2024
2d105ef
add new version
BillWagner Nov 14, 2024
5d74d23
indent final 2-entry bullet 1 level (#1206)
RexJaeschke Nov 15, 2024
000309e
Small tweaks to "Local variable declarations" (#1208)
RexJaeschke Nov 17, 2024
f4ebeb4
Add the list of attributes that support nullable analysis. (#1191)
BillWagner Nov 20, 2024
f378225
Bump the dotnet group across 1 directory with 3 updates (#1212)
dependabot[bot] Nov 20, 2024
2f9cbbc
Add examples for nullability and null states (#1192)
BillWagner Nov 20, 2024
c10ff18
[create-pull-request] automated change (#1210)
github-actions[bot] Nov 20, 2024
a7525ff
Specify generic constraints added to support nullable reference types…
BillWagner Nov 20, 2024
2f5f317
[create-pull-request] automated change (#1216)
github-actions[bot] Nov 20, 2024
7a021a9
Remove attributes that aren't yet available in C# 8 (#1218)
BillWagner Nov 21, 2024
975eeed
[create-pull-request] automated change (#1219)
github-actions[bot] Nov 21, 2024
4ac9f8d
[Milestone]
Nigel-Ecma Nov 21, 2024
1e71c21
[FLW]
Nigel-Ecma Nov 21, 2024
3f133e8
Merge pull request #1195 from Nigel-Ecma/issue-1190
BillWagner Nov 22, 2024
2b81a82
Merge pull request #1207 from BillWagner/install-v2-grammar-check
BillWagner Nov 22, 2024
d1e4c20
Remove accidentally-nested template directory
jskeet Nov 21, 2024
74b8e03
Use LangVersion=8 where feasible in testing
jskeet Nov 21, 2024
4e5e0a6
Expect an error for an unconstrained use of T?
jskeet Nov 22, 2024
60cb5dc
Fix typo in example specification
jskeet Nov 22, 2024
4320310
[create-pull-request] automated change (#1222)
github-actions[bot] Nov 22, 2024
f4debe3
Add Missing Subsection, General, to 9.2.9 "Local variables" (#1223)
RexJaeschke Dec 2, 2024
4e64ae0
[create-pull-request] automated change (#1224)
github-actions[bot] Dec 2, 2024
edd2ca9
Add more NRT examples (#1225)
BillWagner Dec 11, 2024
80ffac8
The compiler -> a compiler (#1226)
BillWagner Dec 11, 2024
31e02af
[create-pull-request] automated change (#1231)
github-actions[bot] Dec 11, 2024
f1dd653
Remove constraints on stackalloc (support new locations) (#1211)
gafter Dec 11, 2024
a1a0195
Correct 2xgrammar rules for compilation unit name
RexJaeschke May 25, 2024
e0850c6
[create-pull-request] automated change (#1234)
github-actions[bot] Dec 11, 2024
ce4d2dc
remove prohibition of unmanaged constructed types (#604)
RexJaeschke Dec 11, 2024
41d1a00
Update v8-feature-tracker (#1236)
RexJaeschke Dec 12, 2024
373b038
Update to BuildGrammar 2.1.0 (#1239)
Nigel-Ecma Dec 16, 2024
81d9d57
Fix typing error (#1241)
progalgo Dec 27, 2024
e68671f
Update expressions.md
sapph42 Jan 9, 2025
bc1b6e3
Performed copyediting of the expressions document.
Sep 2, 2024
14f83e2
Performed copyediting of the classes document.
Sep 2, 2024
e242d89
Performed copyediting of attributes, delegates, interfaces, and struc…
Sep 2, 2024
e218d9a
Performed copyediting of the conversions document.
Sep 2, 2024
ffaeef0
Performed additional copyediting of the expressions document.
Sep 2, 2024
1359e5c
Incorporated feedback
Sep 21, 2024
1eafa3e
Updated expressions section 12.6.4.2 based on PR comments
Oct 15, 2024
8b32f3f
Reverted change of 'input parameter'
Oct 15, 2024
deb1a52
Made minor updates to hyperlinks that I had missed in previous merge …
Nov 14, 2024
dcfbe0a
NuGet updates (#1251)
BillWagner Jan 15, 2025
3339c44
[create-pull-request] automated change (#1252)
github-actions[bot] Jan 22, 2025
f4fe0f1
Address issue #1246 (#1258)
Nigel-Ecma Feb 3, 2025
99f9b5d
Reconcile library type name lists (#1259)
RexJaeschke Feb 4, 2025
4041a8a
update dependency action (#1260)
BillWagner Feb 4, 2025
1094cac
[create-pull-request] automated change (#1261)
github-actions[bot] Feb 4, 2025
bebb835
Add Nullable Annotation To Some Library Methods (#1268)
RexJaeschke Feb 6, 2025
f577893
Bump actions/setup-java from 1 to 4 (#1262)
dependabot[bot] Feb 19, 2025
b4fb5cc
Bump peter-evans/create-pull-request from 3.4.1 to 7.0.6 (#1264)
dependabot[bot] Feb 19, 2025
dd9ac58
Bump actions/setup-dotnet from 1 to 4 (#1265)
dependabot[bot] Feb 19, 2025
ebbc3f3
Bump actions/checkout from 2 to 4 (#1266)
dependabot[bot] Feb 19, 2025
0f02405
Bump actions/setup-node from 3.6.0 to 4.2.0 (#1267)
dependabot[bot] Feb 19, 2025
74c52d4
Bump step-security/harden-runner from 2.10.1 to 2.11.0 (#1272)
dependabot[bot] Feb 19, 2025
e6debd5
Bump the dotnet group in /tools with 4 updates (#1270)
dependabot[bot] Feb 19, 2025
7a58947
fix the step to setup the JDK (#1273)
BillWagner Feb 20, 2025
afbf099
Refactor the subsections of §12.8.17, "The new operator" (#1247)
RexJaeschke Feb 20, 2025
20adffb
Fast follow on renumbering (#1275)
BillWagner Feb 20, 2025
a518e82
Tweak/correct partial types and methods (#1271)
RexJaeschke Feb 20, 2025
4a0b2ac
[create-pull-request] automated change (#1276)
github-actions[bot] Feb 20, 2025
0e87444
Bump actions/checkout from 2.7.0 to 4.2.2 (#1279)
dependabot[bot] Feb 26, 2025
c98794f
Bump peter-evans/create-pull-request from 7.0.6 to 7.0.7 (#1280)
dependabot[bot] Feb 26, 2025
f885375
Bump Microsoft.CodeAnalysis.Workspaces.MSBuild from 4.12.0 to 4.13.0 …
dependabot[bot] Feb 26, 2025
046b37a
[Milestone] (#1281)
Nigel-Ecma Mar 5, 2025
22a5775
[BG 2.3.0] (#1284)
Nigel-Ecma Mar 10, 2025
85d9c74
Bump System.Text.Json from 9.0.2 to 9.0.3 in /tools in the dotnet gro…
dependabot[bot] Mar 12, 2025
f0951ae
Bump peter-evans/create-pull-request from 7.0.7 to 7.0.8 (#1282)
dependabot[bot] Mar 12, 2025
bebc600
Bump actions/setup-node from 4.2.0 to 4.3.0 (#1293)
dependabot[bot] Mar 19, 2025
143bdc0
Addresses issue #1283.
Nigel-Ecma Mar 10, 2025
a2cd777
Fix x-refs.
Nigel-Ecma Mar 10, 2025
36a6983
Fix x-refs.
Nigel-Ecma Mar 10, 2025
75ca573
[DTW.1] expression_list, query_body_clauses, type_parameters, variant…
Nigel-Ecma Mar 17, 2025
8306316
[DTW.2] Remove *type_parameter_constraints_clauses* orphaned in the v…
Nigel-Ecma Mar 17, 2025
cd3310a
[create-pull-request] automated change (#1295)
github-actions[bot] Mar 19, 2025
97140ec
use forked GHA (#1298)
BillWagner Mar 20, 2025
3993701
Bump the dotnet group in /tools with 2 updates (#1300)
dependabot[bot] Apr 9, 2025
4db1844
Bump step-security/harden-runner from 2.11.0 to 2.11.1 (#1301)
dependabot[bot] Apr 9, 2025
3034835
[create-pull-request] automated change (#1296)
github-actions[bot] Apr 9, 2025
b6117cd
Remove (s) in favor of just s
jskeet Mar 19, 2025
ba0673e
Update standard/expressions.md
jskeet Mar 19, 2025
0f60b26
Add notnull example
jskeet Apr 15, 2025
a191e24
Adjust wording
jskeet Apr 16, 2025
6389cd0
It is => it shall be
jskeet Apr 16, 2025
ba031e9
Fix typo (#1311)
BillWagner Apr 16, 2025
7b655f6
Straw man to address extern constructor requirements
jskeet Apr 15, 2025
e8ae8ef
Suggestions in meeting
jskeet Apr 16, 2025
ecf59c5
[create-pull-request] automated change (#1312)
github-actions[bot] Apr 17, 2025
f24e29b
Bump actions/setup-node from 4.3.0 to 4.4.0 (#1310)
dependabot[bot] Apr 17, 2025
4995441
Bump System.Text.Json from 9.0.3 to 9.0.4 in /tools in the dotnet gro…
dependabot[bot] Apr 17, 2025
9871870
Update v8-feature-tracker.md (#1316)
RexJaeschke Apr 22, 2025
6781d09
Bump step-security/harden-runner from 2.11.1 to 2.12.0 (#1317)
dependabot[bot] Apr 24, 2025
da5900d
[DTW.3] (#1318)
Nigel-Ecma May 1, 2025
ccd03b6
[create-pull-request] automated change (#1319)
github-actions[bot] May 1, 2025
f36f8ed
[DTW.4]
Nigel-Ecma May 2, 2025
1d639da
Apply suggestions from code review
Nigel-Ecma May 6, 2025
4894c57
[create-pull-request] automated change (#1321)
github-actions[bot] May 6, 2025
428e5fe
Bump xunit.runner.visualstudio in /tools in the dotnet group (#1324)
dependabot[bot] May 8, 2025
51691be
Merge branch 'dotnet:draft-v8' into Add-support-for-target-typed-cond…
RexJaeschke May 9, 2025
7207d15
remove leading spaces
RexJaeschke May 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/docs-feedback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Learn feedback control.
description: |
⛔ This template is hooked into the feedback control on the bottom of every page on the learn.microsoft.com site. It automatically fills in several fields for you. Don't use for other purposes. ⛔
body:
- type: markdown
attributes:
value: "## Issue information"
- type: markdown
attributes:
value: Select the issue type, and describe the issue in the text box below. Add as much detail as needed to help us resolve the issue. Make sure to include the relevant section number. The committee is working on C# 8 currently. Don't write issues about features added after that version.
- type: dropdown
id: issue-type
attributes:
label: Type of issue
options:
- Typo
- Spec incorrect
- Spec incomplete
- xref missing
- Other (describe below)
validations:
required: true
- type: textarea
id: feedback
validations:
required: true
attributes:
label: Description
- type: markdown
attributes:
value: "## 🚧 Document information 🚧"
- type: markdown
attributes:
value: "*Don't modify the following fields*. They are automatically filled in for you. Doing so will disconnect your issue from the affected article. *Don't edit them*."
- type: input
id: pageUrl
validations:
required: true
attributes:
label: Page URL
- type: input
id: contentSourceUrl
validations:
required: true
attributes:
label: Content source URL
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: "github-actions" # Core GitHub Actions
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
open-pull-requests-limit: 10
- package-ecosystem: "nuget"
directory: "/tools" #tools.sln
schedule:
interval: "weekly"
day: "wednesday"
open-pull-requests-limit: 5
groups:
# Group .NET updates together for solutions.
dotnet:
patterns:
- "*" # Prefer a single PR per solution update.
Binary file not shown.
Binary file modified .github/workflows/dependencies/EcmaTC49.Smarten.tar
Binary file not shown.
Binary file not shown.
164 changes: 81 additions & 83 deletions .github/workflows/dependencies/ReplaceAndAdd.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,88 +32,15 @@ the automatic section numbering tooling, they **must** be maintained manually.

# Verification-Only Replacements & Additions

This set of replacements and additions is the bare minimum required to allow the grammar to verify and run, though
it may not produce the desired parse (that requires at least the use of modes and/or
lexical predicates).
This set of replacements and additions is the bare minimum required to allow the grammar
to verify and run, though it may not produce the desired lex and parse (that requires at
least the use of modes and/or lexical predicates).

This set can be used as a basic check that the grammar is a correct ANTLR grammar.
Pre-processing directives are skipped like whitespace, however lexing confirms the lexical
grammar is valid.

---

## Top Level Rule

The Standard’s *compilation_unit* as is will allow garbage at the end of a file, this
rule has an EOF requirement to ensure the whole of the input must be a correct program.

> *Note: The section number makes this the first rule in the grammar, not required but it
has to go somewhere…*

### 0.0.0 Top Level Rule

```ANTLR
// [ADDED] Rule added as the start point
prog: compilation_unit EOF;
```
---

## Discarding Whitespace

The following changes in §7.3.2, §7.3.3 and §7.3.4, add `-> skip` to the “whitespace”
token rules so that are not passed to the parser. This behaviour is implicit in the
Standard.

### 7.3.2 Line terminators

```ANTLR
// [SKIP]
New_Line
: ( New_Line_Character
| '\u000D\u000A' // carriage return, line feed
) -> skip
;
```

### 7.3.3 Comments

```ANTLR
// [SKIP]
Comment
: ( Single_Line_Comment
| Delimited_Comment
) -> skip
;
```

### 7.3.4 White space

```ANTLR
// [SKIP]
Whitespace
: ( [\p{Zs}] // any character with Unicode class Zs
| '\u0009' // horizontal tab
| '\u000B' // vertical tab
| '\u000C' // form feed
) -> skip
;

```

---

## Pre-processing directives

This change causes all pre-processor directives to be discarded, they don’t need to be
processed to validate the grammar (processing them would exercise the *implementation*
of the pre-processor, which is not part of the Standard).
This set can be used as a basic check that the grammar is a valid ANTLR grammar.

### 7.5.1 General

```ANTLR
// [CHANGE] Discard pre-processor directives
PP_Directive
: (PP_Start PP_Kind PP_New_Line) -> skip
;
```

---

Expand All @@ -125,32 +52,74 @@ strive not to introduce any new ones).
This change resolves the one remaining MLR group by inlining some of the non-terminal
alternatives in *primary_no_array_creation_expression*.

Non-terminals that are inlined are commented out and the inlined body is indented.
Non-terminals that are inlined
are commented out and the inlined body is indented.

This change has not been made to the Standard itself as it makes *primary_no_array_creation_expression*
“uglier” and would obfuscate somewhat the description in the Standard.
“uglier” and would obfuscate somewhat the description in the Standard – both
subjective reasons of course...

As MLR is not supported by ANTLR without this change the grammar would be rejected.

### 12.7.1 General
### 12.8.1 General

```ANTLR
// [CHANGE] This removes a mutual left-recursion group which we have (currently?)
// [CHANGE] decided to leave in the Standard. Without this change the grammar will fail.
// [CHANGE] decided to leave in the Standard. Without this change the grammar will
// [CHANGE] fail to verify.
# Expect
primary_no_array_creation_expression
: literal
| interpolated_string_expression
| simple_name
| parenthesized_expression
| tuple_expression
| member_access
| null_conditional_member_access
| invocation_expression
| element_access
| null_conditional_element_access
| this_access
| base_access
| post_increment_expression
| post_decrement_expression
| null_forgiving_expression
| object_creation_expression
| delegate_creation_expression
| anonymous_object_creation_expression
| typeof_expression
| sizeof_expression
| checked_expression
| unchecked_expression
| default_value_expression
| nameof_expression
| anonymous_method_expression
| pointer_member_access // unsafe code support
| pointer_element_access // unsafe code support
| stackalloc_expression
;
# ReplaceWith
primary_no_array_creation_expression
: literal
| interpolated_string_expression
| simple_name
| parenthesized_expression
| tuple_expression
// | member_access
| primary_no_array_creation_expression '.' identifier type_argument_list?
| array_creation_expression '.' identifier type_argument_list?
| predefined_type '.' identifier type_argument_list?
| qualified_alias_member '.' identifier type_argument_list?
// | null_conditional_member_access
| primary_no_array_creation_expression '?' '.' identifier type_argument_list? dependent_access*
| array_creation_expression '?' '.' identifier type_argument_list? dependent_access*
// | invocation_expression
| primary_no_array_creation_expression '(' argument_list? ')'
| array_creation_expression '(' argument_list? ')'
// | element_access and pointer_element_access (unsafe code support)
| primary_no_array_creation_expression '[' argument_list ']'
// | null_conditional_element_access
| primary_no_array_creation_expression '?' '[' argument_list ']' dependent_access*
| this_access
| base_access
// | post_increment_expression
Expand All @@ -159,6 +128,9 @@ primary_no_array_creation_expression
// | post_decrement_expression
| primary_no_array_creation_expression '--'
| array_creation_expression '--'
// | null_forgiving_expression
| primary_no_array_creation_expression null_forgiving_operator
| array_creation_expression null_forgiving_operator
| object_creation_expression
| delegate_creation_expression
| anonymous_object_creation_expression
Expand All @@ -174,5 +146,31 @@ primary_no_array_creation_expression
| array_creation_expression '->' identifier type_argument_list?
// | pointer_element_access // unsafe code support
// covered by element_access replacement above
| stackalloc_expression
;
```


---

## Interpolated strings

The lexical rules for interpolated strings are context-sensitive and are not ANLTR-ready in the Standard
as how such rules are handled is an implementation detail, e.g. using ANTLR modes.
Here we just define one token in terms of another to remove the overlap warnings.

### 12.8.3 Interpolated string expressions

```ANTLR
// [CHANGE] This allows the grammar to verify without warnings, it does NOT correctly
// [CHANGE] parse interpolated strings – that requires modes and/or lexical predicates.
// [CHANGE] Note: Interpolated strings are properly parsed in Base and other sets.
# Expect
Interpolated_Verbatim_String_End
: '"'
;
# ReplaceWith
Interpolated_Verbatim_String_End
: Interpolated_Regular_String_End
;
```
38 changes: 38 additions & 0 deletions .github/workflows/do-not-merge-label-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This GitHub Action workflow is triggered on label changes for pull requests.
# When a pull request is labeled with "DO NOT MERGE", the workflow fails, thus
# preventing the pull request from being merged. Otherwise, the workflow will
# succeed, allowing the pull request to be merged.

name: "Check labels that prevent merge"
on:
pull_request:
branches: [main]
types: [labeled, unlabeled]

permissions:
contents: read

jobs:
labels-preventing-merge-check:
runs-on: ubuntu-latest
strategy:
matrix:
label:
# Labels that prevent merging
- 'do not merge'
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

- name: 'Check "${{ matrix.label }}" label'
run: |
echo "::notice::Merging permission is diabled for PRs when the '${{ matrix.label }}' label is applied."

if [ "${{ contains(github.event.pull_request.labels.*.name, matrix.label) }}" = "true" ]; then
echo "::error::Pull request is labeled as '${{ matrix.label }}'. Please remove the label before merging."
exit 1
else
exit 0
fi
14 changes: 7 additions & 7 deletions .github/workflows/grammar-validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ jobs:

steps:
- name: Check out our repo
uses: actions/checkout@v2
uses: actions/checkout@v4.2.2

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Set up JDK 15
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 15.0
distribution: zulu

# Install build grammar global tool
- name: Install BuildGrammar tool
run: |
dotnet tool install --version 1.0.0-alpha.2 --global --add-source ./.github/workflows/dependencies/ EcmaTC49.BuildGrammar

dotnet tool install --version 2.1.0 --global --add-source ./.github/workflows/dependencies/ EcmaTC49.BuildGrammar

- name: run validate
run: |
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/markdown-links-verifier.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
statuses: write

steps:
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
- name: Use Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 16.x
- name: Run Markdownlint
Expand Down
Loading