-
Notifications
You must be signed in to change notification settings - Fork 54
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 typemeasure to literalexpr #547
Add typemeasure to literalexpr #547
Conversation
@dawedawe Yes, it's just as we've discussed. If FCS doesn't provide actual ranges for The next step here would be to define grammar rules for the measure kinds:
After that you'll need to reflect that in the structure produced by the builder too. |
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.
@dawedawe Everything looks much better now, thanks! I've also left some comments on the tree structure and tests, please take a look when you have time.
ReSharper.FSharp/test/data/parsing/Expr - Const - Measure - Var 01.fs.gold
Outdated
Show resolved
Hide resolved
ReSharper.FSharp/src/FSharp.Psi.Features/src/Parsing/FSharpImplTreeBuilder.fs
Show resolved
Hide resolved
ReSharper.FSharp/test/data/parsing/Expr - Const - Measure - Divide 01.fs.gold
Outdated
Show resolved
Hide resolved
ReSharper.FSharp/src/FSharp.Psi.Features/src/Parsing/FSharpImplTreeBuilder.fs
Show resolved
Hide resolved
ReSharper.FSharp/test/data/parsing/Expr - Const - Measure - One 05.fs.gold
Show resolved
Hide resolved
ReSharper.FSharp/test/data/parsing/Expr - Const - Measure - Seq 04.fs.gold
Outdated
Show resolved
Hide resolved
- add tests for PSI structure - add test for rename refactoring
17a3428
to
1577b31
Compare
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.
@dawedawe This is very nice work, there's just a pair of small issues with the structure/grammar correspondence. I've also left few other comments, but they are not as important.
ReSharper.FSharp/src/FSharp.Psi.Features/src/Parsing/FSharpImplTreeBuilder.fs
Outdated
Show resolved
Hide resolved
ReSharper.FSharp/src/FSharp.Psi.Features/src/Parsing/FSharpImplTreeBuilder.fs
Outdated
Show resolved
Hide resolved
ReSharper.FSharp/src/FSharp.Psi.Features/src/Parsing/FSharpImplTreeBuilder.fs
Outdated
Show resolved
Hide resolved
ReSharper.FSharp/src/FSharp.Psi.Features/src/Parsing/FSharpImplTreeBuilder.fs
Outdated
Show resolved
Hide resolved
ReSharper.FSharp/src/FSharp.Psi.Features/src/Parsing/FSharpImplTreeBuilder.fs
Outdated
Show resolved
Hide resolved
INamedTypeUsage | ||
ITypeReferenceName |
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.
I've just realized: perhaps a type usage wasn't needed here, and having just a type reference would be enough for features like Rename. We should probably try removing it when updating this code after FCS is updated.
update tests gold files don't create INTEGER_RAT in PSI
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.
@dawedawe Great work, thanks!
I think that's the PSI structure we talked about.
It's not explicitly using the range of
< ... >
but it seems to work by advansing the lexer to<