-
Notifications
You must be signed in to change notification settings - Fork 789
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
Don't show completions on nested module identifier #13089
Conversation
Code looks ok but the new test is still failing |
I know and I have described why that is. Any clue on how to go about what I'm asking for? |
Would it be necessary to add For the sole reason that this nested module would appear in the syntax tree namespace N
module Nested |
Bump? |
/azp run |
/run fantomas |
@kerams if you want I might help with that later this week. |
Well, first I want to know whether we're OK with extending the syntax tree just for this use case. If that isn't the case, the PR can be closed. Otherwise I only need a tip on the preferred approach with regards to modelling the error case. |
Well from what I understand @dsyme is fine with that and nobody is against in general :) |
I've added recovery for incomplete nested modules. Before: After: @auduchinok, @nojaf , before I add tests and extend this to signature files, can you please check if the changes look sound to you? |
Ugh, it doesn't work with ML compatibility mode #indent "off"
module M
let SimpleSample() = 1 Is there a way to simulate a pattern guard in yacc? | opt_attributes opt_access moduleIntro // when not mlSupport Or maybe it's time this long-deprecated syntax was finally removed in .NET 8 SDK? :) |
I think this looks fine, though I'm less familiar with recovery. I'll let @auduchinok take this one. |
If all is working by itself with |
The Moon and the stars have aligned, ready for review. |
As you changed the |
Thanks @kerams 🙏 |
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.
@kerams I wonder if changes to LexFilter
are still needed after you've changed recovery to use the builtin logic?
tests/service/data/SyntaxTree/NestedModule/IncompleteNestedModuleShouldBePresent.fs
Show resolved
Hide resolved
(updating to get the "short ranges" string representation in) |
@kerams this is ready to merge, right? |
Yup. |
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.
Cool, thanks a lot!
* Don't show completions on nested module identifier * Recover from incomplete module declaration * Blah * Fixes * Fix parser * Fix parser * Format * Add AST tests * Revert LexFilter changes * Readd LexFilter * Update baselines * Format * Update baselines --------- Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>
A simple fix.This test is failing because without the equals sign
Nest
does not appear in the syntax tree at all. What exactly would it take to make this happen? I'm assuming something in the parser. Unfortunately, I am not yet familiar with that part of the compiler.