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

Feature request: Extract grammarkdown source from ecmarkup #87

Open
Alhadis opened this issue Oct 26, 2022 · 1 comment
Open

Feature request: Extract grammarkdown source from ecmarkup #87

Alhadis opened this issue Oct 26, 2022 · 1 comment

Comments

@Alhadis
Copy link

Alhadis commented Oct 26, 2022

I see there's a grammar for ECMAScript 2020. It'd be nice if grammarkdown provided an option for emitting Grammarkdown source from an Ecmarkup file. Something to the effect of:

$ wget https://raw.githubusercontent.com/tc39/ecma262/es2022/spec.html
$ grammarkdown --extract spec.html
@ line 5012 file:///Users/Alhadis/Desktop/spec.html

  StringNumericLiteral :::
    StrWhiteSpace?
    StrWhiteSpace? StrNumericLiteral StrWhiteSpace?

   StrWhiteSpace :::
     StrWhiteSpaceChar StrWhiteSpace?

   StrWhiteSpaceChar :::
     WhiteSpace
     LineTerminator
@rbuckton
Copy link
Owner

grammarkdown only has very minimal support for HTML. This is actually something I'd rather see ecmarkup support itself. It's one of the reasons I added @line directives in the first place, though that was primarily motivated by an ecmarkup VS code extension I was working on a few years ago (but have yet to finish, unfortunately).

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

No branches or pull requests

2 participants