You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract production rules dfns from ECMAScript spec (#1881)
Via mdn/browser-compat-data#27246
This completes preprocessing of the ECMAScript spec to also extract production
rules that are needed for documentation purpose. These production rules are
defined in `<emu-production>` tags wrapped in `<emu-grammar type="definition">`
tags.
Annex B re-defines some of the production rules for Web browser hosts. To
avoid duplication, the code adds a `"for": ["Web browsers"]` to disambiguate.
All definitions are created with a "grammar" definition type, and flagged as
"private" (at least until it becomes clear that the terms are needed for xref
purpose). Use of "grammar" is not fantastic but is already done by the CSP
spec and it avoids introducing a new definition type that isn't explicitly
supported by spec authoring tools.
Copy file name to clipboardExpand all lines: test/extract-dfns.js
+35-1Lines changed: 35 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -214,7 +214,7 @@ const tests = [
214
214
spec: "ecmascript"
215
215
},
216
216
{
217
-
title: "extracts properties of the globalThis object in ecmascript spec",
217
+
title: "extracts properties of the globalThis object in ecmascript spec",
218
218
html: '<emu-clause id="sec-value-properties-of-the-global-object"><h1><span class="secnum">25.1.5.1</span> Value Properties of the Global Object</h1><emu-clause id="foo"> <h1>Foo</h1></emu-clause></emu-clause>',
title: 'assign ids to un-id’d definitions of the ecmascript spec',
297
331
html: '<emu-clause id="foo"><h1><span class="secnum">9.4</span> Execution Contexts</h1><p>An <dfn variants="execution contexts">execution context</dfn> is a specification device that is used to track the runtime evaluation of code by an ECMAScript implementation.</p></emu-clause>',
0 commit comments