As a contributor who hasn't spent a ton of time in the F# compiler interacting with the AST, I often find myself unsure of what a given node looks like in practice, and I have to do a lot of trial & error (usually in fantomas-tools) checking things to see what node matches what text. I feel like it would be super helpful to new and existing contributors to have a minimal example for each non-trivial node.
This could be especially useful for some more complex or less intuitive nodes and those with compiler-centered abbreviations (e.g. PatIsInstNode, ExprAppNode).
I believe this could help encourage newer contributors and also help current contributors understand the codebase and patterns better.
As a contributor who hasn't spent a ton of time in the F# compiler interacting with the AST, I often find myself unsure of what a given node looks like in practice, and I have to do a lot of trial & error (usually in fantomas-tools) checking things to see what node matches what text. I feel like it would be super helpful to new and existing contributors to have a minimal example for each non-trivial node.
For example:
This could be especially useful for some more complex or less intuitive nodes and those with compiler-centered abbreviations (e.g.
PatIsInstNode
,ExprAppNode
).I believe this could help encourage newer contributors and also help current contributors understand the codebase and patterns better.