Skip to content

[Repo Assist] Add doc comment examples to key ExprXxxNode types in SyntaxOak.fs#3216

Merged
nojaf merged 1 commit intomainfrom
repo-assist/improve-syntaxoak-doc-comments-6c5be5e02e3040fc
Feb 26, 2026
Merged

[Repo Assist] Add doc comment examples to key ExprXxxNode types in SyntaxOak.fs#3216
nojaf merged 1 commit intomainfrom
repo-assist/improve-syntaxoak-doc-comments-6c5be5e02e3040fc

Conversation

@github-actions
Copy link
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Adds short /// Example: ... doc comments to the most commonly encountered expression node types in SyntaxOak.fs, making it easier for new and existing contributors to quickly understand which F# syntax construct each node represents without having to search through the AST or use fantomas-tools by trial and error.

This is a first step toward the goal described in #2991.

Types documented

Node Example syntax
ExprLazyNode lazy computeExpensiveValue
ExprNewNode new StringBuilder(capacity)
ExprTupleNode (a, b, c)
ExprArrayOrListNode [a; b; c] / `[
ExprRecordNode { Field1 = v1 } / { existing with Field1 = v }
ExprLambdaNode fun x y -> x + y
ExprMatchLambdaNode function | Some x -> x | None -> d
ExprMatchNode match x with | Some v -> v | None -> 0
ExprSameInfixAppsNode a + b + c (same operator repeated)
ExprInfixAppNode a + b (two operands)
ExprChain person.Address.City.ToUpper()
ExprAppLongIdentAndSingleParenArgNode List.map(f)
ExprAppSingleParenArgNode f(a)
ExprAppNode List.map f xs
ExprIfThenNode if condition then result
ExprIfThenElseNode if condition then trueResult else falseResult
ExprIfThenElifNode if a then x elif b then y else z

Test Status

Build succeeds (dotnet build src/Fantomas.Core/Fantomas.Core.fsproj -c Release). This is a documentation-only change with no behavioral impact.

Generated by Repo Assist

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@828ac109efb43990f59475cbfce90ede5546586c. View source at https://github.com/githubnext/agentics/tree/828ac109efb43990f59475cbfce90ede5546586c/workflows/repo-assist.md.

Add short inline doc comments (/// Example: ...) to the most commonly
encountered expression node types, making it easier for new contributors
to understand which F# syntax constructs each node represents.

Types documented: ExprLazyNode, ExprNewNode, ExprTupleNode,
ExprArrayOrListNode, ExprRecordNode, ExprLambdaNode,
ExprMatchLambdaNode, ExprMatchNode, ExprSameInfixAppsNode,
ExprInfixAppNode, ExprChain, ExprAppLongIdentAndSingleParenArgNode,
ExprAppSingleParenArgNode, ExprAppNode, ExprIfThenNode,
ExprIfThenElseNode, ExprIfThenElifNode.

Relates to #2991.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor Author

Pull request created: #3216

@nojaf nojaf marked this pull request as ready for review February 26, 2026 07:05
@nojaf nojaf enabled auto-merge February 26, 2026 07:05
@nojaf nojaf merged commit cd2d2b5 into main Feb 26, 2026
13 checks passed
github-actions bot added a commit that referenced this pull request Feb 26, 2026
Adds short '/// Example: ...' doc comments to all Pattern node types,
following the same pattern as the Expr*Node comments added in #3216.

Closes #2991

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Mar 7, 2026
Continues the documentation work from:
- #3216 (Expr*Node doc comments)
- #3229 (Pat*Node doc comments)

Adds /// doc comments with examples to all Type*Node types, to help
tool authors understand the Oak intermediate representation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant