Skip to content

docs: clarify imprecise XML comments - #38

Merged
rameel merged 1 commit into
mainfrom
docs/clarify-xml-comments
Nov 19, 2026
Merged

rameel merged 1 commit into
mainfrom
docs/clarify-xml-comments

Conversation

@rameel

@rameel rameel commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Several XML comments were vague or imprecise. This PR clarifies them:

  • Expr.Call and Expr.Indexer called their arguments parameters, and Expr.Call described its target as a function reference. The examples now show the arguments in context, as in Math.Abs(-5).
  • Expr.Unary.UnaryType was described as the type of the operation, which is easy to confuse with the target type of a conversion.
  • ExprVisitor was described as a rewriter, and the comments of Visit(IReadOnlyList<Expr>) referred to IReadOnlyList{T}, which inside ExprVisitor<T> reads as a list of T.
  • UnaryType.Convert did not say that the conversion is explicit.
  • ConstantNumberParser claimed to follow the C# syntax, although it does not support digit separators or real literals that start with a decimal point, such as .5.
  • TypeUtils.IsNumeric and CanConvertPrimitive did not say which types they accept, and ApplyEnumZeroConversion did not mention that x - 0 keeps the enum type.

It also removes filler words and repetitions, and starts the ReflectionExtensions summary with "Provides extension methods for".

The unsupported literal forms and the result type of x - 0 were checked against the parser.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Several XML comments were vague or imprecise:

- Expr.Call and Expr.Indexer called their arguments parameters, and
  Expr.Call described its target as a function reference. The
  examples now show the arguments in context, as in Math.Abs(-5).
- Expr.Unary.UnaryType was described as the type of the operation,
  which is easy to confuse with the target type of a conversion.
- ExprVisitor was described as a rewriter, and the comments of
  Visit(IReadOnlyList<Expr>) referred to IReadOnlyList{T}, which
  inside ExprVisitor<T> reads as a list of T.
- UnaryType.Convert did not say that the conversion is explicit.
- ConstantNumberParser claimed to follow the C# syntax, although it
  does not support digit separators or real literals that start with
  a decimal point, such as .5.
- TypeUtils.IsNumeric and CanConvertPrimitive did not say which types
  they accept, and ApplyEnumZeroConversion did not mention that x - 0
  keeps the enum type.

It also removes filler words and repetitions, and starts the
ReflectionExtensions summary with "Provides extension methods for".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rameel
rameel merged commit d5b26d1 into main Nov 19, 2026
1 check passed
@rameel
rameel deleted the docs/clarify-xml-comments branch November 19, 2026 10:26
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.

1 participant