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 doc comments in SyntaxNode.fs giving an example of what each node looks like #2991

Open
josh-degraw opened this issue Nov 18, 2023 · 0 comments
Labels
documentation good first issue Long hanging fruit: easy issue to get your feet wet!

Comments

@josh-degraw
Copy link
Contributor

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:

/// Example:
/// `fun x -> x`
type ExprLambdaNode(funNode: SingleTextNode, parameters: Pattern list, arrow: SingleTextNode, expr: Expr, range) =
    inherit NodeBase(range)

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.

@josh-degraw josh-degraw added discussion documentation good first issue Long hanging fruit: easy issue to get your feet wet! labels Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation good first issue Long hanging fruit: easy issue to get your feet wet!
Projects
None yet
Development

No branches or pull requests

1 participant