Skip to content

Commit 0043d9c

Browse files
Format
1 parent d6821f7 commit 0043d9c

File tree

1 file changed

+53
-54
lines changed

1 file changed

+53
-54
lines changed

spec.emu

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,59 +1775,58 @@
17751775
</emu-clause>
17761776
</emu-clause>
17771777

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>
18271826

18281827
<emu-clause id="sec-OriginalScopeStart" type="sdo">
18291828
<h1>
1830-
OriginalScopePosition(
1829+
OriginalScopePosition (
18311830
_lineAccumulator_: an Index Accumulator Record,
18321831
_columnAccumulator_: an Index Accumulator Record,
18331832
): a Position Record
@@ -1855,7 +1854,7 @@
18551854

18561855
<emu-clause id="sec-OriginalScopeName" type="sdo">
18571856
<h1>
1858-
OriginalScopeName(
1857+
OriginalScopeName (
18591858
_accumulator_: an Index Accumulator Record,
18601859
_names_: a List of Strings,
18611860
): a String or *null*
@@ -1875,7 +1874,7 @@
18751874

18761875
<emu-clause id="sec-OriginalScopeKind" type="sdo">
18771876
<h1>
1878-
OriginalScopeKind(
1877+
OriginalScopeKind (
18791878
_accumulator_: an Index Accumulator Record,
18801879
_names_: a List of Strings,
18811880
): a String or *null*
@@ -1898,7 +1897,7 @@
18981897

18991898
<emu-clause id="sec-OriginalScopeVariables" type="sdo">
19001899
<h1>
1901-
OriginalScopeVariables(
1900+
OriginalScopeVariables (
19021901
_accumulator_: an Index Accumulator Record,
19031902
_names_: a List of Strings,
19041903
): a List of Strings
@@ -1923,7 +1922,7 @@
19231922

19241923
<emu-clause id="sec-RelativeName" type="abstract operation">
19251924
<h1>
1926-
RelativeName(
1925+
RelativeName (
19271926
_vlq_: a |Vlq| Parse Node,
19281927
_accumulator_: an Index Accumulator Record,
19291928
_names_: a List of Strings,

0 commit comments

Comments
 (0)