In the Lexical Scoping section, second paragraph, the description of the scope gets a little fuzzy in at the definition of "end of the script". By the name of the section, I'm pretty sure what you mean. But, the "end of script" could be taken to mean the end of a script in {} or the end of the file (which might be thought of as a script).
In the next paragraph, you specify scope definitions in trying to explain shadowing names. We could probably tighten up the whole section by moving the scope definitions up and then stating that a definition runs to the end of the enclosing scope. Shadowing a definition is then also defined in terms of the inner scope. The scope definitions are fundamental, so I think they should be first.
This is technically the same as what you said, but I think the minor reorg will reduce potential confusion.
In the Lexical Scoping section, second paragraph, the description of the scope gets a little fuzzy in at the definition of "end of the script". By the name of the section, I'm pretty sure what you mean. But, the "end of script" could be taken to mean the end of a script in {} or the end of the file (which might be thought of as a script).
In the next paragraph, you specify scope definitions in trying to explain shadowing names. We could probably tighten up the whole section by moving the scope definitions up and then stating that a definition runs to the end of the enclosing scope. Shadowing a definition is then also defined in terms of the inner scope. The scope definitions are fundamental, so I think they should be first.
This is technically the same as what you said, but I think the minor reorg will reduce potential confusion.