Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338532

Summary: [editor] closure compiler complains that "char" is a reserved word
Product: [ECD] Orion Reporter: Andrew Niefer <aniefer>
Component: ClientAssignee: Felipe Heidrich <eclipse.felipe>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, john.arthorne, Silenio_Quarti, simon_kaegi
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Andrew Niefer CLA 2011-03-01 09:04:28 EST
The running the google closure compiler during the releng build, it fails on editor.js complaining that "char" is a reserved word.


     [java] 
     [java] /shared/eclipse/e4/orion/I201103010200/plugins/org.eclipse.orion.client.editor/web/js/editor.js:2802: ERROR - Parse error. missing variable name
     [java] if (char !== " ") {
     [java]          ^
     [java] 
     [java] /shared/eclipse/e4/orion/I201103010200/plugins/org.eclipse.orion.client.editor/web/js/editor.js:2803: ERROR - Parse error. identifier is a reserved word
     [java]     text += char;
     [java] 	        ^
Comment 2 John Arthorne CLA 2011-03-02 09:00:34 EST
Interesting. Closure appears to be incorrect. "char" is not a reserved word in ECMAScript or JavaScript:

http://people.mozilla.org/~jorendorff/es5.html#sec-7.6.1
https://developer.mozilla.org/en/JavaScript/Reference/Reserved_Words
Comment 3 John Arthorne CLA 2011-03-02 09:02:05 EST
Here is the closure bug... I guess its easier to just change our code anyway:

http://code.google.com/p/closure-compiler/issues/detail?id=357