question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: restrict to given language spec version

See original GitHub issue

Similar to Acorn’s ecmaVersion option, the parser could restrict to a given language spec version (e.g., ES5) and have it throw an error if an unknown token is found (e.g., “Unexpected token let” if in ES5 mode).

This could probably be done externally using an onToken callback though.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
KFlashcommented, Aug 22, 2020

Most of this projects was made by my students, so Meriyah at least is safe to use and used by others. Seafox is just an experiment code I did to figure out what my students did wrong.

The EScaya project is my own code with no students involved, so you can follow me on EScaya. The differences with that parser is many, and it has error recovery, incremental parsing and you can use the AST you want through a parseCustom method. Still WIP.

As of now Meriyah is safe to use in production.

1reaction
coreybutlercommented, Aug 22, 2020

@KFlash - not sure where to ask this, but since the subject has creeped up in this thread, I’m going to ask. Is any one of these projects something you’d recommend using in production? Cherow, Meriyah, Buntis, Seafox, Escaya… it seems like things change pretty frequently. Your work is great and I love that it’s keeping up not just with the ES spec, but with alot of Stage 3 stuff. It’s just kind of hard to keep up with given all the different variations. Any guidance would be appreciated! I’m happy to open a new issue if that’s a better forum for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

C# Compiler Options - language feature rules - Microsoft Learn
LangVersion / -langversion : Specify language version such as default (latest major version), or latest (latest version, including minor ...
Read more >
restrict type qualifier - cppreference.com
Each individual type in the C type system has several qualified versions of that type, corresponding to one, two, or all three of...
Read more >
ARM Compiler toolchain Compiler Reference Version 5.03
The restrict keyword is a C99 feature. It enables you to convey a declaration of intent to the compiler that different pointers and...
Read more >
Metal feature set tables | Apple Developer
Inline constexpr samplers that you declare in Metal Shading Language (MSL) code count against the limit. For example, for a feature set ...
Read more >
What does the restrict keyword mean in C++? - Stack Overflow
Does it mean the two or more pointer given to the function does not overlap? What else does it mean? c++ · restrict-qualifier...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found