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

ERROR TypeError: Class constructor Lexer cannot be invoked without 'new' #394

Closed
tawalters61 opened this issue Dec 12, 2018 · 4 comments
Closed

Comments

@tawalters61
Copy link

I just tried using antlr4ts for the first time... and got the following error:

ERROR TypeError: Class constructor Lexer cannot be invoked without 'new'

This occurs at the time I attempt to create the Lexer for my DSL.

Any ideas?

Thanks.

@lujun2
Copy link

lujun2 commented Dec 13, 2018

It may related to your tsconfig.json, try use es6 as your compile target

{
  "compilerOptions": {
     "target": "es6",
  }
}

@tawalters61
Copy link
Author

Thanks. This worked.

@sharwell
Copy link
Member

@lujun2 This project uses es2015 as the target. Do you know which targets I should expect to work and which ones not?

@piotrl
Copy link

piotrl commented Jan 30, 2019

It seem it does not work with es5 target (sadly, as it's still default target for many projects)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants