Compiler doesn't output synthetic code in WHITESPACE_ONLY
See original GitHub issuecat lol.js
let a = [0, 1];
for (var x of a) {
}
java -jar ~/code/compiler.jar \
--compilation_level=WHITESPACE_ONLY \
--js_output_file=/dev/stdout \
--language_in=ECMASCRIPT6_STRICT \
--language_out=ECMASCRIPT5_STRICT \
--formatting=PRETTY_PRINT \
--js lol.js
'use strict';var a = [0, 1];
for (var $jscomp$iter$0 = $jscomp.makeIterator(a), $jscomp$key$x = $jscomp$iter$0.next();!$jscomp$key$x.done;$jscomp$key$x = $jscomp$iter$0.next()) {
var x = $jscomp$key$x.value
}
;
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:7 (6 by maintainers)
Top Results From Across the Web
WHITESPACE_ONLY mode does non-whitespace-only ...
I think it is reasonable to expect WHITESPACE_ONLY to only do what it says and not make other adjustments which alter the way...
Read more >Why doesn't c++ compiler output the text on the next line while ...
Space characters and newline characters are treated by the compiler differently, even though both are whitespace characters.
Read more >Syntactically Significant Whitespace Considered Harmful
The compiler just shows a warning not a compile error, then it is just one character per source file instead of always having...
Read more >Solved: Blank space in variable name - Intel Communities
Solved: Hello everybody, is there a compiler option that can detect blank space in a variable name ? Currently, I have following code,...
Read more >Compiler Options - ClojureScript
:provides A synthetic namespace that is associated with the library. This is typically a vector with a single string, but it has the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
See also this: https://github.com/google/closure-compiler/issues/2950
If it isn’t going to include the jscomp.* code, it shouldn’t include the polyfills either as it, it is duplicating polyfill code and is still is non-functional. The compiler should produce a functional bundle at least that would be something useful.
@OzoneGrif, will setting the
--language_out=ES_2017
option to avoid transpilation be sufficient for your needs? Or maybe just useSIMPLE
optimization mode?This is a low priority issue.