Last active
May 8, 2020 12:41
-
-
Save vincentdchan/a67ee79011c9c1fbb699a137538dcbe7 to your computer and use it in GitHub Desktop.
Scope Analysis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// module scope start | |
// Block | |
{ // <- scope start | |
} // <- scope end | |
// Class | |
class Foo { // <- scope start | |
} // <- scope end | |
// If else | |
if (true) { // <- scope start | |
} /* <- scope end */ else { // <- scope start | |
} // <- scope end | |
// For | |
for (;;) { // <- scope start | |
} // <- scope end | |
// Catch | |
try { | |
} catch (e) { // <- scope start | |
} // <- scope end | |
// Function | |
function() { // <- scope start | |
} // <- scope end | |
// Scope | |
switch() { // <- scope start | |
} // <- scope end | |
// module scope end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How about separate scopes in "try", "finally", "case inside switch" and "default inside switch"?