dotnet/roslyn

`IsPreprocessorKeyword` documentation comment doesn't match implementation

开放

#54,604 创建于 2021年7月4日

 (0 条评论) (0 个反应) (0 位负责人)C# (4,257 个派生)batch import
Area-CompilersBughelp wanted

仓库指标

星标
 (20,414 个星标)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 256 个 PR)

描述

https://github.com/dotnet/roslyn/blob/43afd6dfd4b79380ff48078dfb264c60c518948c/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Services/SyntaxFacts/ISyntaxFacts.cs#L81-L85

The documentation says: "The set of identifiers that have special meaning directly after the # token". However, the implementation delegates to the following:

https://github.com/dotnet/roslyn/blob/43afd6dfd4b79380ff48078dfb264c60c518948c/src/Compilers/CSharp/Portable/Syntax/SyntaxKindFacts.cs#L68-L101

which returns true for things that, as far as I know, doesn't come "directly after" the # (for example TrueKeyword).

贡献者指南