ClojureScript

Allow language_in and language_out options to be passed to the Google Closure compiler

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

While I was messing around with ClojureScript and nodejs, I
noticed that the Google Closure compiler complains when JavaScript
reserved words are used. Newer versions of JavaScript engines allow
reserved words (like "static", "class") to be used as object
properties. The Closure Compiler knows this and does not complain when
you set the language_in option to the correct version of JavaScript.

Activity

Hide
David Nolen added a comment -

Richard please open a new ticket for this.

Show
David Nolen added a comment - Richard please open a new ticket for this.
Hide
Richard Hull added a comment -

Could the ECMASCRIPT6 and ECMASCRIPT6_STRICT enums be added please?
http://javadoc.closure-compiler.googlecode.com/git/com/google/javascript/jscomp/CompilerOptions.LanguageMode.html

Not really a major problem, but when I set :language-in to ECMASCRIPT5 without setting :language-out, I get the following:

com.google.javascript.jscomp.CompilerOptionsValidator$InvalidOptionsException: 
Can only convert code from ES6 to ES3. Cannot convert from ECMASCRIPT5 to ECMASCRIPT3.
Show
Richard Hull added a comment - Could the ECMASCRIPT6 and ECMASCRIPT6_STRICT enums be added please? http://javadoc.closure-compiler.googlecode.com/git/com/google/javascript/jscomp/CompilerOptions.LanguageMode.html Not really a major problem, but when I set :language-in to ECMASCRIPT5 without setting :language-out, I get the following:
com.google.javascript.jscomp.CompilerOptionsValidator$InvalidOptionsException: 
Can only convert code from ES6 to ES3. Cannot convert from ECMASCRIPT5 to ECMASCRIPT3.
Hide
Ivan Willig added a comment -

I apologize for letting this slip, work got busy. CA is in the mail.

Show
Ivan Willig added a comment - I apologize for letting this slip, work got busy. CA is in the mail.
Hide
Chas Emerick added a comment -

@iwillig Looking forward to seeing this, def send in that CA.

Show
Chas Emerick added a comment - @iwillig Looking forward to seeing this, def send in that CA.
Hide
David Nolen added a comment -

Ivan have you signed and sent in your CA?

Show
David Nolen added a comment - Ivan have you signed and sent in your CA?
Hide
David Nolen added a comment -

Excellent thanks.

Show
David Nolen added a comment - Excellent thanks.

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: