-
Notifications
You must be signed in to change notification settings - Fork 22
Scopes: Refactor scopes tree decoding #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scopes: Refactor scopes tree decoding #220
Conversation
|
I just noticed that this makes FlattenedScopes in post-order rather than pre-order, I need to fix that. |
| 1. If |OriginalScopeVariablesItem| is present, then | ||
| 1. Set _originalScope_.[[Variables]] to the OriginalScopeVariables of |OriginalScopeVariablesItem| with arguments _state_.[[ScopeVariableIndex]] and _names_. | ||
| 1. If |OriginalScopeItemList| is present, then | ||
| 1. Set _originalScope_.[[Children]] to the DecodedOriginalScopeTrees of |OriginalScopeItemList| with arguments _state_ and _names_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be DecodeInnerOriginalScopeTrees?
| 1. Let _childScope_ be DecodeOriginalScope(|OriginalScopeTree|, _state_, _names_). | ||
| 1. Append _childScope_ to _scope_.[[Children]]. | ||
| 1. Let _left_ be the DecodedOriginalScopeTrees of |OriginalScopeItemList| with arguments _state_ and _names_. | ||
| 1. Let _right_ be the DecodedOriginalScopeTrees of |OriginalScopeItem| with arguments _state_ and _names_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here probably DeocdeInnerOriginalScopeTrees.
|
Thanks! lgtm % a minor bug. As a suggestion: We could flip the naming. So instead of having |
|
Fixed and renamed. Merging! :) |
Originally opened at szuend#1. See #196 (comment).
I tried to make it a bit easier to see what is going on by:
We could do something similar for TopLevelItemList.