|
1775 | 1775 | </emu-clause> |
1776 | 1776 | </emu-clause> |
1777 | 1777 |
|
1778 | | - <emu-clause id="sec-DecodedOriginalScopeTrees" type="sdo"> |
1779 | | - <h1> |
1780 | | - DecodedOriginalScopeTrees ( |
1781 | | - _state_: a Decode Scope State Record, |
1782 | | - _names_: a List of Strings, |
1783 | | - ): a List of either Original Scope Records or *null* |
1784 | | - </h1> |
1785 | | - <dl class="header"></dl> |
1786 | | - <emu-grammar> |
1787 | | - OriginalScopeItemList : OriginalScopeItemList `,` OriginalScopeItem |
1788 | | - </emu-grammar> |
1789 | | - <emu-alg> |
1790 | | - 1. Let _left_ be the DecodedOriginalScopeTrees of |OriginalScopeItemList| with arguments _state_ and _names_. |
1791 | | - 1. Let _right_ be the DecodedOriginalScopeTrees of |OriginalScopeItem| with arguments _state_ and _names_. |
1792 | | - 1. Return the list-concatenation of _left_ and _right_. |
1793 | | - </emu-alg> |
1794 | | - <emu-grammar> |
1795 | | - OriginalScopeTreeItem: [empty] |
1796 | | - </emu-grammar> |
1797 | | - <emu-alg> |
1798 | | - 1. Return « *null* ». |
1799 | | - </emu-alg> |
1800 | | - <emu-grammar> |
1801 | | - OriginalScopeTree : |
1802 | | - OriginalScopeStart OriginalScopeVariablesItem? OriginalScopeItemList? `,` OriginalScopeEnd |
1803 | | - </emu-grammar> |
1804 | | - <emu-alg> |
1805 | | - 1. Let _start_ be the OriginalScopePosition of |OriginalScopeStart| with arguments _state_.[[ScopeLine]] and _state_.[[ScopeColumn]]. |
1806 | | - 1. Let _name_ be the OriginalScopeName of |OriginalScopeStart| with arguments _state_.[[ScopeNameIndex]] and _names_. |
1807 | | - 1. Let _kind_ be the OriginalScopeKind of |OriginalScopeStart| with arguments _state_.[[ScopeKindIndex]] and _names_. |
1808 | | - 1. Let _flags_ be the VLQUnsignedValue of |OriginalScopeStart|'s |ScopeFlags| nonterminal. |
1809 | | - 1. If _flags_ & 0x4 = 0x4, then |
1810 | | - 1. Let _isStackFrame_ be *true*. |
1811 | | - 1. Else, |
1812 | | - 1. Let _isStackFrame_ be *false*. |
1813 | | - 1. If |OriginalScopeVariablesItem| is present, then |
1814 | | - 1. Let _variables_ be the OriginalScopeVariables of |OriginalScopeVariablesItem| with arguments _state_.[[ScopeVariableIndex]] and _names_. |
1815 | | - 1. Else, |
1816 | | - 1. Let _variables_ be « ». |
1817 | | - 1. If |OriginalScopeItemList| is present, then |
1818 | | - 1. Let _children_ be the DecodedOriginalScopeTrees of |OriginalScopeItemList| with arguments _state_ and _names_. |
1819 | | - 1. Else, |
1820 | | - 1. Let _children_ be « ». |
1821 | | - 1. Let _end_ be the OriginalScopePosition or |OriginalScopeEnd| with arguments _state_.[[ScopeLine]] and _state_.[[ScopeColumn]]. |
1822 | | - 1. Let _originalScope_ be the Original Scope Record { [[Start]]: _start_, [[End]]: _end_, [[Name]]: _name_, [[Kind]]: _kind_, [[Variables]]: _variables_, [[Children]]: _children_, [[IsStackFrame]]: _isStackFrame_ }. |
1823 | | - 1. Append _originalScope_ to _state_.[[FlatOriginalScopes]]. |
1824 | | - 1. Return « _originalScope_ ». |
1825 | | - </emu-alg> |
1826 | | - </emu-clause> |
| 1778 | + <emu-clause id="sec-DecodedOriginalScopeTrees" type="sdo"> |
| 1779 | + <h1> |
| 1780 | + DecodedOriginalScopeTrees ( |
| 1781 | + _state_: a Decode Scope State Record, |
| 1782 | + _names_: a List of Strings, |
| 1783 | + ): a List of either Original Scope Records or *null* |
| 1784 | + </h1> |
| 1785 | + <dl class="header"></dl> |
| 1786 | + <emu-grammar> |
| 1787 | + OriginalScopeItemList : OriginalScopeItemList `,` OriginalScopeItem |
| 1788 | + </emu-grammar> |
| 1789 | + <emu-alg> |
| 1790 | + 1. Let _left_ be the DecodedOriginalScopeTrees of |OriginalScopeItemList| with arguments _state_ and _names_. |
| 1791 | + 1. Let _right_ be the DecodedOriginalScopeTrees of |OriginalScopeItem| with arguments _state_ and _names_. |
| 1792 | + 1. Return the list-concatenation of _left_ and _right_. |
| 1793 | + </emu-alg> |
| 1794 | + <emu-grammar> |
| 1795 | + OriginalScopeTreeItem : [empty] |
| 1796 | + </emu-grammar> |
| 1797 | + <emu-alg> |
| 1798 | + 1. Return « *null* ». |
| 1799 | + </emu-alg> |
| 1800 | + <emu-grammar> |
| 1801 | + OriginalScopeTree : |
| 1802 | + OriginalScopeStart OriginalScopeVariablesItem? OriginalScopeItemList? `,` OriginalScopeEnd |
| 1803 | + </emu-grammar> |
| 1804 | + <emu-alg> |
| 1805 | + 1. Let _start_ be the OriginalScopePosition of |OriginalScopeStart| with arguments _state_.[[ScopeLine]] and _state_.[[ScopeColumn]]. |
| 1806 | + 1. Let _name_ be the OriginalScopeName of |OriginalScopeStart| with arguments _state_.[[ScopeNameIndex]] and _names_. |
| 1807 | + 1. Let _kind_ be the OriginalScopeKind of |OriginalScopeStart| with arguments _state_.[[ScopeKindIndex]] and _names_. |
| 1808 | + 1. Let _flags_ be the VLQUnsignedValue of |OriginalScopeStart|'s |ScopeFlags| nonterminal. |
| 1809 | + 1. If _flags_ & 0x4 = 0x4, then |
| 1810 | + 1. Let _isStackFrame_ be *true*. |
| 1811 | + 1. Else, |
| 1812 | + 1. Let _isStackFrame_ be *false*. |
| 1813 | + 1. If |OriginalScopeVariablesItem| is present, then |
| 1814 | + 1. Let _variables_ be the OriginalScopeVariables of |OriginalScopeVariablesItem| with arguments _state_.[[ScopeVariableIndex]] and _names_. |
| 1815 | + 1. Else, |
| 1816 | + 1. Let _variables_ be « ». |
| 1817 | + 1. If |OriginalScopeItemList| is present, then |
| 1818 | + 1. Let _children_ be the DecodedOriginalScopeTrees of |OriginalScopeItemList| with arguments _state_ and _names_. |
| 1819 | + 1. Else, |
| 1820 | + 1. Let _children_ be « ». |
| 1821 | + 1. Let _end_ be the OriginalScopePosition or |OriginalScopeEnd| with arguments _state_.[[ScopeLine]] and _state_.[[ScopeColumn]]. |
| 1822 | + 1. Let _originalScope_ be the Original Scope Record { [[Start]]: _start_, [[End]]: _end_, [[Name]]: _name_, [[Kind]]: _kind_, [[Variables]]: _variables_, [[Children]]: _children_, [[IsStackFrame]]: _isStackFrame_ }. |
| 1823 | + 1. Append _originalScope_ to _state_.[[FlatOriginalScopes]]. |
| 1824 | + 1. Return « _originalScope_ ». |
| 1825 | + </emu-alg> |
1827 | 1826 |
|
1828 | 1827 | <emu-clause id="sec-OriginalScopeStart" type="sdo"> |
1829 | 1828 | <h1> |
1830 | | - OriginalScopePosition( |
| 1829 | + OriginalScopePosition ( |
1831 | 1830 | _lineAccumulator_: an Index Accumulator Record, |
1832 | 1831 | _columnAccumulator_: an Index Accumulator Record, |
1833 | 1832 | ): a Position Record |
|
1855 | 1854 |
|
1856 | 1855 | <emu-clause id="sec-OriginalScopeName" type="sdo"> |
1857 | 1856 | <h1> |
1858 | | - OriginalScopeName( |
| 1857 | + OriginalScopeName ( |
1859 | 1858 | _accumulator_: an Index Accumulator Record, |
1860 | 1859 | _names_: a List of Strings, |
1861 | 1860 | ): a String or *null* |
|
1875 | 1874 |
|
1876 | 1875 | <emu-clause id="sec-OriginalScopeKind" type="sdo"> |
1877 | 1876 | <h1> |
1878 | | - OriginalScopeKind( |
| 1877 | + OriginalScopeKind ( |
1879 | 1878 | _accumulator_: an Index Accumulator Record, |
1880 | 1879 | _names_: a List of Strings, |
1881 | 1880 | ): a String or *null* |
|
1898 | 1897 |
|
1899 | 1898 | <emu-clause id="sec-OriginalScopeVariables" type="sdo"> |
1900 | 1899 | <h1> |
1901 | | - OriginalScopeVariables( |
| 1900 | + OriginalScopeVariables ( |
1902 | 1901 | _accumulator_: an Index Accumulator Record, |
1903 | 1902 | _names_: a List of Strings, |
1904 | 1903 | ): a List of Strings |
|
1923 | 1922 |
|
1924 | 1923 | <emu-clause id="sec-RelativeName" type="abstract operation"> |
1925 | 1924 | <h1> |
1926 | | - RelativeName( |
| 1925 | + RelativeName ( |
1927 | 1926 | _vlq_: a |Vlq| Parse Node, |
1928 | 1927 | _accumulator_: an Index Accumulator Record, |
1929 | 1928 | _names_: a List of Strings, |
|
0 commit comments