Conversation
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>
Contributor
Author
|
Pull request created: #3216 |
nojaf
approved these changes
Feb 26, 2026
This was referenced Feb 26, 2026
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>
This was referenced Mar 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Adds short
/// Example: ...doc comments to the most commonly encountered expression node types inSyntaxOak.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
ExprLazyNodelazy computeExpensiveValueExprNewNodenew StringBuilder(capacity)ExprTupleNode(a, b, c)ExprArrayOrListNode[a; b; c]/ `[ExprRecordNode{ Field1 = v1 }/{ existing with Field1 = v }ExprLambdaNodefun x y -> x + yExprMatchLambdaNodefunction | Some x -> x | None -> dExprMatchNodematch x with | Some v -> v | None -> 0ExprSameInfixAppsNodea + b + c(same operator repeated)ExprInfixAppNodea + b(two operands)ExprChainperson.Address.City.ToUpper()ExprAppLongIdentAndSingleParenArgNodeList.map(f)ExprAppSingleParenArgNodef(a)ExprAppNodeList.map f xsExprIfThenNodeif condition then resultExprIfThenElseNodeif condition then trueResult else falseResultExprIfThenElifNodeif a then x elif b then y else zTest Status
Build succeeds (
dotnet build src/Fantomas.Core/Fantomas.Core.fsproj -c Release). This is a documentation-only change with no behavioral impact.