Skip to content

Conversation

@brianrourkeboll
Copy link
Contributor

@brianrourkeboll brianrourkeboll commented Mar 3, 2024

Note: while SyntaxCollectorBase + walkAst could also theoretically be replaced by ParsedInput.fold, I have not done so in this PR.

Footnotes

  1. The one usage I didn't update is tryGetExplicitTypeInfo — this would in theory actually be quite easy to solve using ParsedInput.tryNode, except that I discovered that FCS doesn't actually call dive/pick for patterns (like it does for expressions and other node types) and uses List.tryPick instead, which means that the deepest matching pattern is not always returned. I may try to see if that's something that can be fixed in FCS.

@baronfel
Copy link
Contributor

baronfel commented Mar 3, 2024

Holy smokes these look amazing. THANK YOU for taking the time to port us over to the new API - its already much cleaner and easier to follow what some of the matches are trying to do.

@brianrourkeboll brianrourkeboll marked this pull request as ready for review March 3, 2024 21:24
@baronfel
Copy link
Contributor

baronfel commented Mar 3, 2024

Thanks again @brianrourkeboll - this looks awesome :)

@baronfel baronfel merged commit 4343ccc into ionide:nightly Mar 3, 2024
@brianrourkeboll brianrourkeboll deleted the ast-api branch March 3, 2024 21:42
@nojaf
Copy link
Contributor

nojaf commented Mar 4, 2024

Great work @brianrourkeboll!

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.

3 participants