▲ | kazinator 2 days ago | |
Using older C#, a minimal program in which I have this expression:
produces:
Note that it is not saying "syntax error". C# has parsed it. We have an assignment with a left hand side. The syntax already exists. There is just a semantic constraint error.This error got replaced with code which allows that type of expression, and generates code for it rather than a diagnostic. I can't say for sure that they did zero parser work for the feature, but it sure looks like in principle, you do not have to, for this case, given that it already parses. (If they have a parser which handles semantic attributes in teh grammar like "assignable expression", then of course that gets adjusted.) For reference:
|