-
-
Notifications
You must be signed in to change notification settings - Fork 645
Closed
Labels
P-highPriority - HighPriority - High
Description
Currently Traverse
's timing of entering and exiting scopes is different for different node types. It depends on whether the scope covers all fields, or only a subset.
- If scope starts after some fields, scope is entered after
enter_*
and exited beforeexit_*
. - If scope covers whole node, scope is entered before
enter_*
and exited afterexit_*
.
This means enter_*
and exit_*
for any node are always called with same scope at top of the scope stack. Good.
But the fact that current scope in enter_*
and exit_*
is different depending on the node makes it confusing.
Change this to be consistent for all node types:
- Always enter the scope after
enter_*
. - Always exit the scope before
exit_*
.
If they need it, enter_*
/ exit_*
can get the node's ScopeId
from the node's scope_id
field.
Metadata
Metadata
Assignees
Labels
P-highPriority - HighPriority - High