-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Move feature check from lexer to binder. #57113
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -771,7 +771,6 @@ private void ScanSyntaxToken(ref TokenInfo info) | |
else if (TextWindow.PeekChar(1) == '$' && TextWindow.PeekChar(2) == '"') | ||
{ | ||
this.ScanInterpolatedStringLiteral(isVerbatim: true, ref info); | ||
CheckFeatureAvailability(MessageID.IDS_FeatureAltInterpolatedVerbatimStrings); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lexer check #1. intended to be overridden by parser. |
||
break; | ||
} | ||
else if (!this.ScanIdentifierOrKeyword(ref info)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -628,7 +628,6 @@ private void ScanInterpolatedStringLiteralHoleBalancedText(char endingChar, bool | |
} | ||
else if (_lexer.TextWindow.PeekChar(1) == '$' && _lexer.TextWindow.PeekChar(2) == '"') | ||
{ | ||
_lexer.CheckFeatureAvailability(MessageID.IDS_FeatureAltInterpolatedVerbatimStrings); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lexer check #2, during recursive interpolated string lexing. Intended to be overridden by parser. |
||
var interpolations = (ArrayBuilder<Interpolation>?)null; | ||
var info = default(TokenInfo); | ||
bool wasVerbatim = _isVerbatim; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1091,12 +1091,6 @@ protected TNode CheckFeatureAvailability<TNode>(TNode node, MessageID feature, b | |
return availableVersion >= LanguageVersion.CSharp2 | ||
? node | ||
: this.AddError(node, ErrorCode.WRN_NonECMAFeature, feature.Localize()); | ||
|
||
case MessageID.IDS_FeatureAltInterpolatedVerbatimStrings: | ||
return availableVersion >= requiredVersion | ||
? node | ||
: this.AddError(node, ErrorCode.ERR_AltInterpolatedVerbatimStringsNotAvailable, | ||
new CSharpRequiredLanguageVersion(requiredVersion)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. special case error message. moved to https://github.com/dotnet/roslyn/pull/57113/files#diff-a1cb0e0d2615ca34e6c6cfc96a0300cb85c046ca6f90bf0d8931021ec8ccc480R334 |
||
} | ||
|
||
var info = feature.GetFeatureAvailabilityDiagnosticInfo(this.Options); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parser check.