jsparser
jsparser copied to clipboard
Parsing jquery.cloud9carousel.js fails
Parsing of jquery.cloud9carousel.js fails using the parser demo ( http://www.cjihrig.com/development/jsparser/ ) with error message:
SyntaxError: Parse error on line 243:
...o rotate // this.go = function(
---------------------^
Expecting ',', ';', got 'THIS'
I have been able to make the parser succeed with any of the following changes:
- Remove all preceding
//comments
@@ -242,9 +242,6 @@
this.timer = 0;
}
- //
- // Spin the carousel. Count is the number (+-) of carousel items to rotate
- //
this.go = function( count ) {
this.destRotation += (2 * Math.PI / this.items.length) * count;
this.play();
- Insert a comma:
,
@@ -240,7 +240,7 @@
this.pause = function() {
this.smooth && cancelFrame ? cancelFrame( this.timer ) : clearTimeout( this.timer );
this.timer = 0;
- }
+ },
//
// Spin the carousel. Count is the number (+-) of carousel items to rotate
- Insert a semicolon:
;
@@ -240,7 +240,7 @@
this.pause = function() {
this.smooth && cancelFrame ? cancelFrame( this.timer ) : clearTimeout( this.timer );
this.timer = 0;
- }
+ };
//
// Spin the carousel. Count is the number (+-) of carousel items to rotate
Thanks for the report. I haven't really had the time to work on this lately, but I'd take a PR fixing this.