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

Add support for structured headers for SDOs #358

Merged
merged 4 commits into from
Sep 14, 2021
Merged

Add support for structured headers for SDOs #358

merged 4 commits into from
Sep 14, 2021

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented Sep 11, 2021

Followup to #327 to extend support to SDOs. As in that PR, the old syntax is still parsed and treated just as today, so this is not a breaking change.

Unlike in #327, the HTML generated here is not identical to what's currently in 262. Specifically, 262 includes either no text at all, the text With parameters _foo_ and _bar_., or on a couple of occasions a paragraph of text. When using structured headers, the output will instead look like

The syntax-directed operation Name takes parameter foo. [optional description] It is defined piecewise over the following productions:


There's a slight oddity here: when using this style to specify parameters, you'd write e.g.

  <emu-clause id="sec-example" type="sdo">
    <h1>
      Example (
        _param_: an ECMAScript language value,
      )
    </h1>
    <dl class='header'>
    </dl>

However, the parameter list never appears in ( list ) form in the output, only in the "takes argument param" prose. I think that's fine, but it might be a bit confusing.

@jmdyck
Copy link
Contributor

jmdyck commented Sep 13, 2021

Why not include the parameter 'type' in the generated prose?

@bakkot
Copy link
Contributor Author

bakkot commented Sep 13, 2021

Why not include the parameter 'type' in the generated prose?

It is included. See e.g. EvaluateAsyncFunctionBody.

@jmdyck
Copy link
Contributor

jmdyck commented Sep 13, 2021

Then I don't understand the "slight oddity" you were describing. Never mind, got it now.

@bakkot bakkot merged commit 4786953 into master Sep 14, 2021
@bakkot bakkot deleted the sdo-headers branch September 14, 2021 00:47
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.

2 participants