Skip to content

Commit 611c941

Browse files
CohenArthurtshepang
authored andcommitted
name-resolution: Fix some typos in "Scopes and ribs"
1 parent f1e6378 commit 611c941

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/name-resolution.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ part of another, it doesn't mean the name visible in the outer one is also
9191
visible in the inner one, or that it refers to the same thing.
9292

9393
To cope with that, the compiler introduces the concept of Ribs. This is
94-
abstraction of a scope. Every time the set of visible names potentially changes,
95-
a new rib is pushed onto a stack. The places where this can happen includes for
94+
an abstraction of a scope. Every time the set of visible names potentially changes,
95+
a new rib is pushed onto a stack. The places where this can happen include for
9696
example:
9797

9898
* The obvious places ‒ curly braces enclosing a block, function boundaries,
@@ -103,8 +103,8 @@ example:
103103

104104
When searching for a name, the stack of ribs is traversed from the innermost
105105
outwards. This helps to find the closest meaning of the name (the one not
106-
shadowed by anything else). The transition to outer rib may also change the
107-
rules what names are usable ‒ if there are nested functions (not closures),
106+
shadowed by anything else). The transition to outer rib may also affect
107+
what names are usable ‒ if there are nested functions (not closures),
108108
the inner one can't access parameters and local bindings of the outer one,
109109
even though they should be visible by ordinary scoping rules. An example:
110110

0 commit comments

Comments
 (0)