Skip to content
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

Add trivia information to SynConst.Measure #15614

Merged
merged 16 commits into from
Jul 21, 2023

Conversation

dawedawe
Copy link
Contributor

@dawedawe dawedawe commented Jul 18, 2023

Combined work with @nojaf

This adds trivia information to SynConst.Measure to help editor tooling dealing with these.

@auduchinok
Copy link
Member

Could you please also capture ranges of optional things, like SynMeasure.One, so we could distinguish parsed and synthetic measures?

@dawedawe
Copy link
Contributor Author

Could you please also capture ranges of optional things, like SynMeasure.One, so we could distinguish parsed and synthetic measures?

Yes, I'll add a range to SynMeasure.One. As far as I can see, that's the only one missing.

@nojaf
Copy link
Contributor

nojaf commented Jul 18, 2023

The interesting use-case for SynMeasure.One would be something like let a = 42< 0_1 / m>.
If we have the range, we can restore the original notation of 1.

 - add tests
 - update baselines
src/Compiler/pars.fsy Outdated Show resolved Hide resolved
@dawedawe dawedawe marked this pull request as ready for review July 18, 2023 15:19
@dawedawe dawedawe requested a review from a team as a code owner July 18, 2023 15:19
- add test
- update surface baselines
src/Compiler/pars.fsy Outdated Show resolved Hide resolved
src/Compiler/pars.fsy Outdated Show resolved Hide resolved
src/Compiler/pars.fsy Outdated Show resolved Hide resolved
@dawedawe
Copy link
Contributor Author

To me, this seems to be okay now. @auduchinok, how about you?

Copy link
Member

@auduchinok auduchinok left a comment

Choose a reason for hiding this comment

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

Just one comment from my side, otherwise it seems good to go in. Thanks @dawedawe!

src/Compiler/pars.fsy Outdated Show resolved Hide resolved
@psfinaki psfinaki enabled auto-merge (squash) July 21, 2023 10:03
@psfinaki psfinaki merged commit 7b5e128 into dotnet:main Jul 21, 2023
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants