Skip to content

Non behavioral cleanup to the lexer prior to raw string work.#54790

Merged
CyrusNajmabadi merged 3 commits intodotnet:mainfrom
CyrusNajmabadi:rawStringsPrecursor
Jul 13, 2021
Merged

Non behavioral cleanup to the lexer prior to raw string work.#54790
CyrusNajmabadi merged 3 commits intodotnet:mainfrom
CyrusNajmabadi:rawStringsPrecursor

Conversation

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

@CyrusNajmabadi CyrusNajmabadi commented Jul 13, 2021

This shoudl be reviewed with whitespace changes off.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner July 13, 2021 04:25
@ghost ghost added the Area-Compilers label Jul 13, 2021
@CyrusNajmabadi CyrusNajmabadi requested review from 333fred and jcouv July 13, 2021 04:25
{
var quoteCharacter = TextWindow.PeekChar();
if (quoteCharacter == '\'' || quoteCharacter == '"')
Debug.Assert(quoteCharacter == '\'' || quoteCharacter == '"');
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for if check here.

public bool allowNewlines;
private readonly Lexer _lexer;
private bool _isVerbatim;
private bool _allowNewlines;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made private and renamed.

internal partial class Lexer
{
private void ScanStringLiteral(ref TokenInfo info, bool allowEscapes = true)
private void ScanStringLiteral(ref TokenInfo info, bool inDirective)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed, inverted and made non-optional.

Copy link
Copy Markdown
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (commit 3). @dotnet/roslyn-compiler for a second review.

Copy link
Copy Markdown
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks (iteration 3)

@CyrusNajmabadi CyrusNajmabadi merged commit 278c39b into dotnet:main Jul 13, 2021
@ghost ghost added this to the Next milestone Jul 13, 2021
@allisonchou allisonchou modified the milestones: Next, 17.0.P3 Jul 27, 2021
@CyrusNajmabadi CyrusNajmabadi deleted the rawStringsPrecursor branch May 3, 2022 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants