Skip to content
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

Support for parsing structured headers for AOs and similar operations #327

Merged
merged 39 commits into from
Jul 7, 2021

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented Jun 29, 2021

As in tc39/ecma262#545.

Headers look like this:

<emu-clause id="sec-exampleao" type="abstract operation">
  <h1>
    ExampleAO (
      param : an integer,
      optional param2 : a String,
    )
  </h1>
  <dl class='header'>
    <dt>description</dt>
    <dd>It is an example.</dd>
  </dl>
  [...]

and produce HTML that looks like this (modulo formatting and other details):

<emu-clause id="sec-exampleao" aoid="ExampleAO">
  <h1>ExampleAO ( param [ , param2 ] )</h1>
  <p>The abstract operation ExampleAO takes argument param (an integer) and optional argument param2 (a String). It is an example.</p>
  [...]

Of note:

  • the name of the AO now appears in the original source once, instead of three times
  • the name of each parameter now appears in the original source once, instead of twice
  • there is a new dd element which we can stuff arbitrary other machine-readable attributes into

This is not a breaking change, since the previous format is still supported.

Copy link
Member

@michaelficarra michaelficarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants