name-resolution: Fix some typos in "Scopes and ribs"

This commit is contained in:
Arthur Cohen 2023-06-13 17:39:43 +02:00 committed by Tshepang Mbambo
parent f1e637883f
commit 611c9418f5
1 changed files with 4 additions and 4 deletions

View File

@ -91,8 +91,8 @@ part of another, it doesn't mean the name visible in the outer one is also
visible in the inner one, or that it refers to the same thing. visible in the inner one, or that it refers to the same thing.
To cope with that, the compiler introduces the concept of Ribs. This is To cope with that, the compiler introduces the concept of Ribs. This is
abstraction of a scope. Every time the set of visible names potentially changes, an abstraction of a scope. Every time the set of visible names potentially changes,
a new rib is pushed onto a stack. The places where this can happen includes for a new rib is pushed onto a stack. The places where this can happen include for
example: example:
* The obvious places curly braces enclosing a block, function boundaries, * The obvious places curly braces enclosing a block, function boundaries,
@ -103,8 +103,8 @@ example:
When searching for a name, the stack of ribs is traversed from the innermost When searching for a name, the stack of ribs is traversed from the innermost
outwards. This helps to find the closest meaning of the name (the one not outwards. This helps to find the closest meaning of the name (the one not
shadowed by anything else). The transition to outer rib may also change the shadowed by anything else). The transition to outer rib may also affect
rules what names are usable if there are nested functions (not closures), what names are usable if there are nested functions (not closures),
the inner one can't access parameters and local bindings of the outer one, the inner one can't access parameters and local bindings of the outer one,
even though they should be visible by ordinary scoping rules. An example: even though they should be visible by ordinary scoping rules. An example: