Skip to content

Conversation

@nojaf
Copy link
Contributor

@nojaf nojaf commented Jan 31, 2022

This PR depends on #12631 and fixes #10198.

There is one questionable change in hardwhiteDefnBindingsTerminator: where I'm using a check to see if IN became an ODECLEND. I'm not sure how bulletproof that check is.

Please review @dsyme.

Many thanks.

@nojaf nojaf force-pushed the in-keyword-trivia branch from 09aedaa to da4a9c3 Compare January 31, 2022 17:57
@KevinRansom KevinRansom merged commit d1849be into dotnet:main Jan 31, 2022
@KevinRansom
Copy link
Contributor

Thanks for taking care of this

Kevin

{ (fun _ m -> ()) }
{ let mToken = rhs parseState 1
// In LexFilter.fs the IN token could have been transformed to an ODECLEND one.
let mIn = if (mToken.EndColumn - mToken.StartColumn) = 2 then Some mToken else None
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dsyme I just discovered that this little hack doesn't work with:

do
    let e1 = e :?> Collections.DictionaryEntry
    e1.Key, e1.Value

Because e1 has the same length as in the check fall apart.
Any other check I can implement to detect that the token was replaced?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep a notion of the in keyword inside the Abstract Syntax Tree.

3 participants