Add support for ES2022? #40

Closed
opened 2024-11-25 06:41:55 +01:00 by xianshenglu · 5 comments
xianshenglu commented 2024-11-25 06:41:55 +01:00 (Migrated from github.com)

Hi,

Thanks for your great work. It really helps a lot.

Maybe just a question, will you support ES2022 and future ES versions?

Hi, Thanks for your great work. It really helps a lot. Maybe just a question, will you support ES2022 and future ES versions?
marijnh commented 2024-11-25 09:29:41 +01:00 (Migrated from github.com)

Which specific types of syntax are you looking to get support for?

Which specific types of syntax are you looking to get support for?
xianshenglu commented 2024-11-25 13:37:25 +01:00 (Migrated from github.com)

Which specific types of syntax are you looking to get support for?

Currently no.

Just a question regarding whether you'll follow up on the updates in ECMAScript.

After all, it's not easy if keeping updating. Or maybe the syntax doesn't change a lot during updates.

Anyway, thanks for your great work.

> Which specific types of syntax are you looking to get support for? Currently no. Just a question regarding whether you'll follow up on the updates in ECMAScript. After all, it's not easy if keeping updating. Or maybe the syntax doesn't change a lot during updates. Anyway, thanks for your great work.
marijnh commented 2024-11-25 13:38:54 +01:00 (Migrated from github.com)

Just a question regarding whether you'll follow up on the updates in ECMAScript.

What I'm trying to understand is why you think that I'm not following updates and why you think this grammar is targeting ES2022 specifically.

> Just a question regarding whether you'll follow up on the updates in ECMAScript. What I'm trying to understand is why you think that I'm not following updates and why you think this grammar is targeting ES2022 specifically.
xianshenglu commented 2024-11-26 08:46:27 +01:00 (Migrated from github.com)

Just a question regarding whether you'll follow up on the updates in ECMAScript.

What I'm trying to understand is why you think that I'm not following updates and why you think this grammar is targeting ES2022 specifically.

Because I see this in the readme.

It parses ES2020, and support.....

And you know there're many versions of javascript

  • ES2015
  • ...
  • ES2020
  • ...

So, I'm wondering how do you handle the support for different ECMAScript versions.

According what you said I assume you'll support the latest syntax for ECMAScript?

So, here comes another question will you also support old versions of ECMAScript syntax in case one day someone post a syntax issue in old version like ES2015? For example, async is not supported in ES2015.

Anyway, thanks a lot for the response and great work!

> > Just a question regarding whether you'll follow up on the updates in ECMAScript. > > What I'm trying to understand is why you think that I'm not following updates and why you think this grammar is targeting ES2022 specifically. Because I see this in the readme. > It parses ES2020, and support..... And you know there're many versions of javascript - ES2015 - ... - ES2020 - ... So, I'm wondering how do you handle the support for different ECMAScript versions. **According what you said I assume you'll support the latest syntax for ECMAScript?** So, here comes another question **will you also support old versions of ECMAScript syntax in case one day someone post a syntax issue in old version like ES2015?** For example, `async` is not supported in ES2015. Anyway, thanks a lot for the response and great work!
marijnh commented 2024-11-26 08:55:50 +01:00 (Migrated from github.com)

Oh, indeed, that reference in the readme is outdated. The grammar is kept up to date with new JS features. Since extensions to the language tend to be defined in a way that doesn't break old code, and Lezer grammars aren't very usable as validators anyway, no effort is made to support parsing only an old subset of the language.

Oh, indeed, that reference in the readme is outdated. The grammar is kept up to date with new JS features. Since extensions to the language tend to be defined in a way that doesn't break old code, and Lezer grammars aren't very usable as validators anyway, no effort is made to support parsing only an old subset of the language.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/javascript#40
No description provided.