-
Notifications
You must be signed in to change notification settings - Fork 131
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
Migrate to ecmarkup #135
Migrate to ecmarkup #135
Conversation
This is the first step to revamp this repo: [ecmarkup](https://github.com/tc39/ecmarkup) is TC39's official tool for specifying syntax and semantics for ECMAScript. I proposed that we should adopt it because it has several favorabilities than the current approach (`README.md` + a `gh-pages` website living in the `websitescript` branch): 1. The resultant `index.html` has a similar looks and feels with the official ECMA-262 spec. 2. It uses [Grammarkdown](https://github.com/rbuckton/grammarkdown) which is not only convenient to write but more importantly, can enforce the grammar to be more formal. 3. It provides links to ECMA-262 out of the box (closed facebook#112). Furthurmore, I can use `<ins>` to make "extension" points explicit. One possible concern it that it'll make this too like a ECMAScript proposal, but I think we mediated by opting-out from the "stage-N proposal" heading, and by explicitly calling out our intention in the "Introduction" section. In addition, - Link to JXON is updated since the original link no more existed. - Parser and Transpiler section is dropped from the "spec" website. - Facebook, Inc. is updated to Meta Platform, Inc everywhere. Once this is merged, we can switch to `main` to host Github Pages.
<emu-note> | ||
names of |JSXOpeningElement| and |JSXClosingElement| should match. | ||
</emu-note> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe more formal?
<emu-clause>
<h1>Static Semantics: Early Errors</h1>
<emu-grammar>JSXOpeningElement JSXChildren? JSXClosingElement</emu-grammar>
<ul>
<li>It is a Syntax Error if the JSXElementName of |JSXOpeningElement| does not have the same source text to JSXElementName of |JSXClosingElement|.</li>
</ul>
</emu-clause>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup I've been thinking of that, but wanted to see if people like this direction first.
Being able to conveniently use other ECMA-262 specification devices is definitely why this change is appealing. There are probably more static semantics hidden from implementations other than this alone.
Thanks for the review! PRs are welcomed once this is merged 😉
Hey @Jack-Works this has been merged. Would you be interested in submitting a PR for the Early Errors? You may use the "Editorial" tag for that. |
Summary
This is the first step to revamp this repo: ecmarkup is TC39's official tool for specifying syntax and semantics for ECMAScript. I proposed that we should adopt it because it has several favorabilities than the current approach (
README.md
+ agh-pages
website living in thewebsitescript
branch):index.html
has a similar looks and feels with the official ECMA-262 spec.<ins>
to make "extension" points explicit.One possible concern is that it makes this spec a bit like a ECMAScript proposal, but I think we mediate it by opting-out from the "stage-N proposal" heading, and by explicitly calling out our intention in the "Introduction" section.
In addition,
Once this is merged, we can switch to
main
to host Github Pages.Test Plan
open
index.html