semi-colon complaint and other 1-7

15 views
Skip to first unread message

kstubs

unread,
Jul 28, 2011, 3:09:31 PM7/28/11
to prototype-s...@googlegroups.com
I'm using eclipse editor and getting some syntax complaints, for example the following:

From appx. line: 4000

while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) {
soFar = m[3];

parts.push( m[1] );

if ( m[2] ) {
extra = m[3];
break;
}
}


Complains that the comma after chunker.exec(""),  should be a .

Make sense?  Is the eclipse issue?
Karl..

T.J. Crowder

unread,
Jul 28, 2011, 4:38:17 PM7/28/11
to Prototype & script.aculo.us
Your title was "semi-colon complaint" but your example was that
Eclipse complains about a comma.

If Eclipse is really saying it thinks that comma should be a dot, then
yes, it's an Eclipse issue. The comma operator[1] is perfectly valid
there.

[1] http://es5.github.com/#x11.14

HTH,
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

kstubs

unread,
Jul 28, 2011, 4:49:00 PM7/28/11
to prototype-s...@googlegroups.com
Thanks.  I started out reporting an issue on a semi-colon, but thought this was more of an obvious problem (that isn't a problem).
So the semi-colon issue is still there, and I think I can resolve them, but seems they occur after things like:

Here's an example from event.js

function(value) { object[method] = value };

Missing semi after value.

Turns out that the additional semi-colon issues I am seeing with prototype 1-7 is a problem after running through Google's compiler.  I only strip white space, but seems that Google compiler is also removing semi-colons...

T.J. Crowder

unread,
Jul 29, 2011, 5:32:23 AM7/29/11
to Prototype & script.aculo.us
Hi,

Yes, in "whitespace only" mode the Closure compiler also deletes any
semicolons that will be inserted by (the horror that is) automatic
semicolon insertion[1]. Eclipse should have an option to disable the
warning if the semicolon would be added by ASI. I would leave it
enabled, though, so you don't rely on ASI in your own code.

[1] http://es5.github.com/#x7.9
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

kstubs

unread,
Jul 29, 2011, 12:00:02 PM7/29/11
to prototype-s...@googlegroups.com
ASI?  Yes, in eclipse I am also looking to ignore validating an entire sub-folder (passively digging for this option).  
Reply all
Reply to author
Forward
0 new messages