ecmarkup
Version:
Custom element definitions and core utilities for markup that specifies ECMAScript and related technologies.
111 lines (90 loc) • 2.97 kB
HTML
<meta charset="utf-8">
<link rel="stylesheet" href="https://bterlson.github.com/ecmarkup/elements.css">
<emu-intro>
<h1>Intro</h1>
<emu-intro>
<h1>Sub Intro</h1>
</emu-intro>
</emu-intro>
<emu-clause>
<h1>Clause Foo(_a_, _b_)</h1>
<emu-clause id="Foo" aoid="Foo">
<h1>Sub Clause</h1>
<emu-note>Note 1!</emu-note>
<emu-note>Note 2!</emu-note>
</emu-clause>
<emu-clause id="Bar" aoid>
<h1>Sub Clause</h1>
</emu-clause>
<emu-import href="imports/import1.html"></emu-import>
<emu-alg>
1. Call Foo(_a_).
2. Call Bar(`toString`).
3. Call Baz(*true*).
1. Do something else.
2. And again.
</emu-alg>
<emu-note>Note!</emu-note>
<emu-production name="WhileStatement">
<emu-rhs>while ( <emu-nt>Expression</emu-nt> ) <emu-nt>Statement</emu-nt></emu-rhs>
</emu-production>
<emu-production name="ArgumentList">
<emu-rhs a="a"><emu-nt>AssignmentExpression</emu-nt></emu-rhs>
<emu-rhs a="b"><emu-nt>ArgumentList</emu-nt> , <emu-nt>AssignmentExpression</emu-nt></emu-rhs>
</emu-production>
<emu-production name="SourceCharacter" type="lexical">
<emu-rhs><emu-gprose>any Unicode code point</emu-gprose></emu-rhs>
</emu-production>
<emu-production name="ExpressionStatement" params="Yield">
<emu-rhs>
<emu-gann>lookahead ∉ {
<emu-t>{</emu-t>,
<emu-t>function</emu-t>,
<emu-t>class</emu-t>,
<emu-t>let [</emu-t>
}</emu-gann>
</emu-rhs>
</emu-production>
<emu-production name="StatementList" params="Return, In">
<emu-rhs constraints="~Return"><emu-nt>ReturnStatement</emu-nt></emu-rhs>
<emu-rhs><emu-nt>ExpressionStatement</emu-nt></emu-rhs>
</emu-production>
<emu-production name="Identifier" type="lexical">
<emu-rhs><emu-nt>IdentifierName</emu-nt> <emu-gmod>but not
<emu-nt>ReservedWord</emu-nt></emu-gmod></emu-rhs>
</emu-production>
<emu-production name="EnumDeclaration">
<emu-rhs>
<emu-t optional>const</emu-t>
<emu-t>enum</emu-t>
<emu-nt>Identifier</emu-nt>
<emu-t>{</emu-t>
<emu-nt optional>EnumBody</emu-nt>
<emu-t>}</emu-t>
</emu-rhs>
</emu-production>
</emu-production>
<!-- added for testing that prodref references first occurance -->
<emu-production name="Identifier" type="lexical">
<emu-rhs>DummyIdentifier</emu-rhs>
</emu-production>
<emu-prodref name="Identifier"></emu-prodref>
<emu-prodref name="ArgumentList" a="a"></emu-prodref>
<emu-grammar>
FooBar(Yeild) ::
[+Default] `foo` Bar(?Yield) #a
`baz` #b
</emu-grammar>
<emu-prodref name="FooBar" a="a"></emu-prodref>
<pre><code class="language-javascript">
function test() { };
test();
</code></pre>
<emu-xref href="#Bar">With link text</emu-xref>
<emu-xref href="#Bar"></emu-xref>
<emu-xref href="#Bar" title></emu-xref>
</emu-clause>
<emu-annex>
<h1>Annex</h1>
</emu-annex>