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

async event, failure to parse #136

Open
setop opened this issue Mar 20, 2020 · 1 comment
Open

async event, failure to parse #136

setop opened this issue Mar 20, 2020 · 1 comment

Comments

@setop
Copy link

setop commented Mar 20, 2020

I extracted a piece of code that generates a parsing error:

$('#form-2').addEventListener('submit', async event => {
	// some stuff
})

raise:

hjsmin: "IdentifierToken {tokenSpan = TokenPn 53 1 54, tokenLiteral = \"event\", tokenComment = [WhiteSpace (TokenPn 52 1 53) \" \"]}"
CallStack (from HasCallStack):
  error, called at src/Language/JavaScript/Parser/Parser.hs:46:17 in language-javascript-0.7.0.0-J7lG5B0tx71prIoGIZvqr:Language.JavaScript.Parser.Parser

When I remove "async", it works.

version:

hjsmin -v
hjsmin version 0.2.0.4 (using language-javascript version 0.7.0.0)
@erikd
Copy link
Owner

erikd commented Jan 11, 2023

hjsmin is just a very thin wrapper to functionality in https://github.com/erikd/language-javascript .

Moving this issue to that repo.

@erikd erikd transferred this issue from erikd/hjsmin Jan 11, 2023
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