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

Compile to JavaScript without semi colons #752

Open
jochemstoel opened this issue Aug 7, 2018 · 4 comments
Open

Compile to JavaScript without semi colons #752

jochemstoel opened this issue Aug 7, 2018 · 4 comments

Comments

@jochemstoel
Copy link

Please implement an optional parameter to compile JavaScript without semi colons.

@vendethiel
Copy link

What? Why?

@jochemstoel
Copy link
Author

What do you mean why? A large portion of developers in the world do not use semi colons (anymore), many of them strongly opinionated. I refrain from the debate about this but I don't want semicolons either.

The parser generator and code generator I am currently using do not include this option either. This is enough reason for me to find a replacement that does. I was looking into alternatives that meet the requirements when I stumbled upon sweet.

I completely understand if this is not a priority for you or is too much work. In that case no problem I will find something else.

/* no semi colons needed */
function Droid(name, color) {
  this.name = name
  this.color = color
}
Droid.prototype.rollWithIt = function (it) {
  console.log('rolling just fine.')
  return this.name + " is rolling with " + it
}

@vendethiel
Copy link

You're not supposed to edit generated code. It's generated code.

@ephetic
Copy link

ephetic commented Aug 7, 2018

Wouldn't this substantially increase the complexity of the generator because now it needs to be wary of situations where semicolonless expressions are parsed wrong?

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

3 participants