dotnet/roslyn

Simplify logic for deconstruction variables in ExpressionVariableFinder

Open

#15,064 创建于 2016年11月7日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)C# (4,257 fork)batch import
Area-CompilersConcept-Design DebtFeature - Tupleshelp wanted

仓库指标

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

描述

Per discussion in PR https://github.com/dotnet/roslyn/pull/14871

  • Maybe we don't need MakeOutVariable and MakeDeconstructionVariable, instead one may suffice, by looking up the syntax tree.
  • Maybe we don't need CollectVariablesFromDeconstruction in ExpressionVariableFinder, instead we just need a VisitVariableDesignation which looks up the syntax tree to determine if it is an out or a deconstruction variable.
  • Then maybe we can re-use ExpressionVariableFinder instead of ForEachLoopBinder.CollectLocalsFromDeconstruction.

贡献者指南