Closed MAJKFL closed 2 days ago
@swift-ci please test
@swift-ci please test
@swift-ci please test Windows
@MAJKFL I've merged, but please look at Alex's comments above to address in a follow-up PR.
Thanks for merging! Once I create a new PR with the suggested changes, I'll respond to the comments and link the fixes.
This PR introduces
ScopeSyntax
protocol and some initial scope implementations.let (a, b) = (0, 0)
and inline chaininglet a = 0, b = 0
.LookupName
, an enum that distinguishes identifiers (extracted from variable declarations and/or closure/function parameters) from declarations (struct, class, actor, function etc.). We could possibly also add more cases that would serve as flags for the compiler later on.for
andwhile
loops and closures.assertLexicalScopeQuery
test harness.ScopeSyntax
protocol to build hierarchy and uses position of the node used for lookup to determine availability of certain declarations (like in code block orif let
).