Browse Source

Add ESLint config. Fix semi-colon usage.

Bentley James Oakes 7 years ago
parent
commit
da1232ddc8

+ 3 - 0
.eslintignore

@@ -0,0 +1,3 @@
+client/3rd_party_libs/*
+doc/*
+coverage/*

+ 35 - 0
.eslintrc.json

@@ -0,0 +1,35 @@
+{
+    "env": {
+        "browser": true,
+        "es6": true,
+        "node": true,
+        "jquery": true
+    },
+    "extends": "eslint:recommended",
+    "parserOptions": {
+        "sourceType": "module"
+    },
+    "rules": {
+        
+        "linebreak-style": [
+            "warn",
+            "unix"
+        ],
+        "quotes": [
+            "off",
+            "single"
+        ],
+        "semi": [
+            "error",
+            "always"
+        ],
+        "no-console": ["off"],
+        
+        //ERRORS TO WARN AND FIX LATER
+        "no-mixed-spaces-and-tabs": ["off"],
+        "no-unused-vars": ["off"],
+        "no-redeclare": ["off"],
+         "no-undef": ["off"],
+         "no-useless-escape": ["off"]
+    }
+}

+ 35 - 31
___do.js

@@ -29,7 +29,7 @@ exports.parallel = function parallel(actions) {
         }
       }, errback);
     });
-  }
+  };
 };
 
 // Chains together several actions feeding the output of the first to the
@@ -50,12 +50,13 @@ exports.chain = function chain(actions) {
       }
     }
     actions[pos](loop, errback);
-  }
-}
+  };
+};
 
 // Takes an array and does an array map over it using the async callback `fn`
 // The signature of `fn` is `function fn(item, callback, errback)`
-exports.map = function map(array, fn) { return function (callback, errback) {
+exports.map = function map(array, fn) {
+  return function (callback, errback) {
   var counter = array.length;
   var new_array = [];
   array.forEach(function (item, index) {
@@ -63,7 +64,7 @@ exports.map = function map(array, fn) { return function (callback, errback) {
       new_array[index] = result;
       counter--;
       if (counter <= 0) {
-        new_array.length = array.length
+        new_array.length = array.length;
         callback(new_array);
       }
     };
@@ -72,7 +73,8 @@ exports.map = function map(array, fn) { return function (callback, errback) {
       cont(local_callback, errback);
     }
   });
-}}
+};
+};
 
 // Takes an array and does an array filter over it using the async callback `fn`
 // The signature of `fn` is `function fn(item, callback, errback)`
@@ -98,7 +100,8 @@ exports.filter = function filter(array, fn) { return function (callback, errback
       cont(local_callback, errback);
     }
   });
-}}
+};
+};
 
 // Takes an array and does a combined filter and map over it.  If the result
 // of an item is undefined, then it's filtered out, otherwise it's mapped in.
@@ -122,28 +125,29 @@ exports.filterMap = function filterMap(array, fn) { return function (callback, e
       cont(local_callback, errback);
     }
   });
-}};
+};
+};
 
 // Allows to group several callbacks.
-exports.combo = function combo(callback) {
-  var items = 0,
-      results = [];
-  function add() {
-    var id = items;
-    items++;
-    return function () {
-      check(id, arguments);
-    };
-  }
-  function check(id, arguments) {
-    results[id] = Array.prototype.slice.call(arguments);
-    items--;
-    if (items == 0) {
-      callback.apply(this, results);
-    }
-  }
-  return { add: add, check: check };
-}
+// exports.combo = function combo(callback) {
+//   var items = 0,
+//       results = [];
+//   function add() {
+//     var id = items;
+//     items++;
+//     return function () {
+//       check(id, arguments);
+//     };
+//   }
+//   function check(id, arguments) {
+//     results[id] = Array.prototype.slice.call(arguments);
+//     items--;
+//     if (items == 0) {
+//       callback.apply(this, results);
+//     }
+//   }
+//   return { add: add, check: check };
+// }
 
 
 // Takes any async lib that uses callback based signatures and converts
@@ -164,10 +168,10 @@ exports.convert = function (lib, names) {
             callback(val);
           }
         });
-        lib[key].apply(lib, args)
-      }
-    }
+        lib[key].apply(lib, args);
+      };
+    };
   });
   return newlib;
-}
+};
 

+ 5 - 2
___fs++.js

@@ -73,7 +73,10 @@ exports.findfiles =
                                             if (_fs.lstatSync(path).isDirectory()) {
                                                 newpath = newpath + '/';
                                             }
-                                        } catch (e) {}                                        
+                                        } catch (e) {
+                                            console.log("Error!");
+                                            console.log(e);
+										}
                                         return newpath;
 									});
 							paths.pop();
@@ -95,7 +98,7 @@ exports.findfiles =
                                     if (_fs.lstatSync(path).isDirectory()) {
                                         return path + "/";
                                     } else return path;
-                                })
+                                });
 							callback(err,newpaths.join('\n'),stderr);
                         }
 					});

+ 5 - 5
__worker.js

@@ -129,13 +129,13 @@ var keepaliveAgent = new _http.Agent({keepAlive: true, maxSockets: 10, maxFreeSo
 /* return a failure continuable */
 function __errorContinuable(err)	
 {
-	return function(callback,errback) {errback(err);}
+	return function(callback,errback) {errback(err);};
 }
 
 /* return a success continuable */
 function __successContinuable(arg)	
 {
-	return function(callback,errback) {callback(arg);}
+	return function(callback,errback) {callback(arg);};
 }
 
 
@@ -628,7 +628,7 @@ function __handleClientRequest(uri,method,reqData,respIndex)
 							 method,
  							 uri,
 							 reqData,
- 							 _wlib)
+ 							 _wlib);
  						 return true;
 	 				 }
 	 			 }) )
@@ -752,7 +752,7 @@ function POST_batchedit(resp,reqData)
 			 							  '/batchCheckpoint?wid='+__wid+
 	  										  '&backstagePass='+__backstagePass,
 				 						  {'name':name});
-						  }
+						  };
 	 		 },
 		 actions = [__successContinuable(), setbchkpt(startchkpt)];
 
@@ -813,7 +813,7 @@ function POST_batchedit(resp,reqData)
 					function()	
 					{
 						__backstagePass = undefined;
-						__postInternalErrorMsg(resp,err)
+						__postInternalErrorMsg(resp,err);
 					},
 					function(undoErr)	
 					{	

+ 3 - 3
client/behavioursc_canvas.js

@@ -202,7 +202,7 @@ __canvasBehaviourStatechart = {
 					if( ! GeometryUtils.areTransformationsAllowed() )
 						console.warn('the selection dragging mode can only be activated if '+
 										 'all of the ends of selected edges are also selected, '+
-										 'and if the geometry controls are inactive')
+										 'and if the geometry controls are inactive');
 					else			
 						this.__T(this.__STATE_DRAGGING_SELECTION,event);
 				}
@@ -212,7 +212,7 @@ __canvasBehaviourStatechart = {
 					if( ! GeometryUtils.areTransformationsAllowed() )
 						console.warn('the geometry controls can only be activated if all '+
 										 'of the ends of selected edges are also selected, and'+
-										 'if the geometry controls aren\'t already active')
+										 'if the geometry controls aren\'t already active');
 					else			
 						GeometryUtils.showGeometryControlsOverlay();
 				}
@@ -423,5 +423,5 @@ __canvasBehaviourStatechart = {
 				}
 			}
 		}
-	}
+	};
 

+ 1 - 1
client/behavioursc_dialog.js

@@ -91,4 +91,4 @@ __dialogBehaviourStatechart = {
 				}
 			}
 		}	
-}
+};

+ 9 - 9
client/client.js

@@ -336,7 +336,7 @@ function _saveModel(fname,backup,autosave)
 	  collaborator) inherit them */
 function _setInvisibleMetamodels(mms)
 {
-	mms = mms.map( function(mm) {return mm.match(/(.*)\.metamodel/)[1]} );
+	mms = mms.map( function(mm) {return mm.match(/(.*)\.metamodel/)[1];} );
 
 	function hideOrShow(uri,icon)
 	{
@@ -396,8 +396,8 @@ function _newFormalism(formalism_name) {
 			if( ! utils.isHttpSuccessCode(statusCode) ) {
 				WindowManagement.openDialog(_ERROR, 'failed to create new formalism :: '+resp);
             } else {
-                WindowManagement.spawnClient("/Formalisms/" + formalism_name + "/" + formalism_name + ".model")
-                WindowManagement.spawnClient("/Formalisms/" + formalism_name + "/" + formalism_name + ".defaultIcons.model")
+                WindowManagement.spawnClient("/Formalisms/" + formalism_name + "/" + formalism_name + ".model");
+                WindowManagement.spawnClient("/Formalisms/" + formalism_name + "/" + formalism_name + ".defaultIcons.model");
             }
 		});
 }
@@ -418,7 +418,7 @@ function _newTransformation(transformation_loc) {
                 if( ! utils.isHttpSuccessCode(statusCode) ) {
                     WindowManagement.openDialog(_ERROR, 'failed to create new transformation :: '+resp);
                 } else {
-                    WindowManagement.spawnClient(transformation_loc)
+                    WindowManagement.spawnClient(transformation_loc);
                 }
             });
     } else {
@@ -442,7 +442,7 @@ function _newRule(rule_loc) {
                 if( ! utils.isHttpSuccessCode(statusCode) ) {
                     WindowManagement.openDialog(_ERROR, 'failed to create new rule :: '+resp);
                 } else {
-                    WindowManagement.spawnClient(rule_loc)
+                    WindowManagement.spawnClient(rule_loc);
                 }
             });
     } else {
@@ -562,7 +562,7 @@ function _loadModelInWindow(args/*fname[]*/)
 	else if(tf > 0 )
 		option = 'TF';
 	else if (vas == 'VAS')
-		option = 'VAS';;
+		option = 'VAS';
 	WindowManagement.spawnClientOption(loc[aid],'',loc[path],option,loc[msg]);
 }
 
@@ -633,7 +633,7 @@ function _openNewDialog(args)
 				}
 				data += ','+msg;				
 				data = '{'+data;
-				data += '}'
+				data += '}';
 				_updateAttr({"asid":pid,"attr":"parameterList","val":data});
 				play = function()
                {
@@ -684,7 +684,7 @@ function _loadToolbarInWindow(args/*fname[]*/)
 	else if(tr > 0 )
 		option = 'TR';
 	else if(tf > 0 )
-		option = 'TF';;	
+		option = 'TF';	
 	WindowManagement.spawnClientOption(loc[path],loc[aid],option,'',loc[msg]);
 }
 
@@ -812,7 +812,7 @@ function __iconToFront(tgt)
 
 function _autolayout()
 {
-    Layout.autolayout()
+    Layout.autolayout();
 }
 
 /*---------------------------- SELECTION OVERLAY -----------------------------*/

+ 1 - 1
client/compile_utils.js

@@ -201,7 +201,7 @@ CompileUtils = function(){
 				continue;
 	
 			var r  = __getVobjGeomAttrVal(vobj['orientation']['value']),
-				 sx = __getVobjGeomAttrVal(vobj['scale']['value'][0])
+				 sx = __getVobjGeomAttrVal(vobj['scale']['value'][0]);
 				 sy = __getVobjGeomAttrVal(vobj['scale']['value'][1]);
 			vobjects[vid].attr(vobj['style']['value']);
 			vobjects[vid].transform(

+ 1 - 1
client/constants.js

@@ -56,7 +56,7 @@ var __WEBPAGE__ = 'https://atompm.github.io/',
 	 __CONTAINMENT_LINK	 	= 'containment',
 
 	 __EVENT_RIGHT_RELEASE_CANVAS			= 0,
- 	 __EVENT_RIGHT_RELEASE_ICON			= 1
+ 	 __EVENT_RIGHT_RELEASE_ICON			= 1,
  	 __EVENT_RIGHT_PRESS_ICON				= 2,
  	 __EVENT_LEFT_RELEASE_CANVAS			= 3,
 	 __EVENT_LEFT_RELEASE_ICON				= 4,

+ 5 - 5
client/file_browser.js

@@ -37,10 +37,10 @@ class FileBrowser{
                                 console.log("/" + window.localStorage.getItem('user') + fileb['getcurrfolder']() + folder_name + '.folder');
                                 DataUtils.createFolder("/" + window.localStorage.getItem('user') + fileb['getcurrfolder']() + folder_name + '.folder', function (statusCode, resp) {
                                     if (!utils.isHttpSuccessCode(statusCode)) {
-                                        feedback.html(resp)
+                                        feedback.html(resp);
                                     } else {
                                         feedback.html('created ' + folder_name);
-                                        fnames.push(fileb['getcurrfolder']() + folder_name + "/")
+                                        fnames.push(fileb['getcurrfolder']() + folder_name + "/");
                                         fileb['refresh'](fnames);
                                     }
                                 });
@@ -219,7 +219,7 @@ class FileBrowser{
                     title,
                     callback);
             });
-    };
+    }
 
 
     /**
@@ -410,13 +410,13 @@ class FileBrowser{
                 return input.val();
             },
             'clearselection': function () {
-                clearSelection()
+                clearSelection();
             },
             'refresh': function (fnames, the_folder) {
                 setCurrentFileBrowserFolder(the_folder || currfolder, fnames);
             }
         };
-    };
+    }
 
 
 }

+ 4 - 4
client/geometry_utils.js

@@ -107,7 +107,7 @@ GeometryUtils = function(){
 	 */
 	this.previewSelectionTransformation = function(op,dir) {
         if (transformationPreviewOverlay == undefined)
-            return
+            return;
 		var bbox  = __selection['bbox'],
 			 scale = (dir > 0 ? 1.05 : 0.95),
 			 angle = (dir > 0 ? 3 : -3);
@@ -126,7 +126,7 @@ GeometryUtils = function(){
 	 */
 	this.previewSelectionTranslation = function(x,y) {
         if (transformationPreviewOverlay == undefined)
-            return
+            return;
 		var _x = parseInt(transformationPreviewOverlay.node.getAttribute('_x')),
 			 _y = parseInt(transformationPreviewOverlay.node.getAttribute('_y'));
 		transformationPreviewOverlay.translate(x-_x,y-_y);
@@ -276,7 +276,7 @@ GeometryUtils = function(){
                                                          true,
                                                          false,
                                                          requests)
-                                         )
+                                         );
             requests = requests.concat(to_concat);
         }
 	
@@ -440,7 +440,7 @@ GeometryUtils = function(){
 				 latter... the results of this form the emitted batchEdit */
 	this.transformSelection = function(callingContext,insertInfo) {
         if (transformationPreviewOverlay == undefined)
-            return
+            return;
 		var T = transformationPreviewOverlay.node.getAttribute('transform');
 		if( T == null || T == 'matrix(1,0,0,1,0,0)' )
 		{

+ 3 - 3
client/gui_utils.js

@@ -174,7 +174,7 @@ GUIUtils = function(){
 			var vals 	 = type.match(/^ENUM\((.*)\)$/)[1],
 				 input 	 = GUIUtils.getSelector(vals.split(','),false,[value]),
 				 getinput = 
-					 function(_){return HttpUtils.getSelectorSelection(_)[0]};
+					 function(_){return HttpUtils.getSelectorSelection(_)[0];};
 		}
 	
 		else if( type.match(/^boolean$/) )
@@ -189,7 +189,7 @@ GUIUtils = function(){
 	
 		else if (matches = type.match("^file<(.*)>")) {
 			var input 	 = GUIUtils.getFileInput(value,matches[1],"code_style string_input",1),
-				 getinput = function(_){return _.val();}
+				 getinput = function(_){return _.val();};
         }
 	
 		else
@@ -273,7 +273,7 @@ GUIUtils = function(){
         });
         string_input.extra_el = extra_el;
         return string_input;
-    }
+    };
 	
 	/**
 	 * Constructs a <textarea> element. In this element, Alt + Right Arrow

+ 1 - 1
client/input_bar_utils.js

@@ -32,7 +32,7 @@ InputBarUtils = function(){
 			}
 			
 		}
-	}
+	};
 	
 	return this;
 }();

+ 1 - 1
client/layout.js

@@ -97,7 +97,7 @@ Layout = function(){
             var s = edgeSource[assoc];
             var t = edgeTarget[assoc];
 
-            links.push({source: s, target: t})
+            links.push({source: s, target: t});
         }
 
 

+ 6 - 6
client/mmm_utils.js

@@ -180,7 +180,7 @@ function __createEdge(segments,style,edgeId,linkuri)
     }
     function getOrderNr(id,visited) {
         var icon = __icons[id];
-        if (visited.indexOf(icon) > 0) return
+        if (visited.indexOf(icon) > 0) return;
         if (icon['ordernr']) return;
         visited.push(icon);
         if (__isConnectionType(id)) {
@@ -188,10 +188,10 @@ function __createEdge(segments,style,edgeId,linkuri)
             icon['ordernr'] = 9999;
         } else if (icon['edgesIn'].length > 0) {
             for (var edgeId in icon['edgesIn']) {
-                var associationid = __edges[icon['edgesIn'][edgeId]]['start']
+                var associationid = __edges[icon['edgesIn'][edgeId]]['start'];
                 if (__isContainmentConnectionType(associationid)) {
                     getOrderNr(__edges[__icons[associationid]['edgesIn'][0]]['start'], visited);
-                    icon['ordernr'] = __icons[__edges[__icons[associationid]['edgesIn'][0]]['start']]['ordernr'] + 1
+                    icon['ordernr'] = __icons[__edges[__icons[associationid]['edgesIn'][0]]['start']]['ordernr'] + 1;
                 }
             }
             if (!icon['ordernr']) icon['ordernr'] = 0;
@@ -203,7 +203,7 @@ function __createEdge(segments,style,edgeId,linkuri)
         getOrderNr(id, []);
     }
     
-    Object.keys(__icons).concat().sort(function(a, b) {return __icons[a]['ordernr'] - __icons[b]['ordernr']}).forEach(function(el) {
+    Object.keys(__icons).concat().sort(function(a, b) {return __icons[a]['ordernr'] - __icons[b]['ordernr'];}).forEach(function(el) {
         __icons[el]['icon'].toFront();
     });
     Object.keys(__edges).forEach(function(el) {
@@ -418,7 +418,7 @@ function __getIconsInContainer(container)
 			return [];
         
         if( explored.indexOf(container) > -1 ) {
-            return []
+            return [];
         }
 	
 		var contents = 
@@ -436,7 +436,7 @@ function __getIconsInContainer(container)
 								}).concat([linkuri]);
 				}));
                 
-        explored.push(container)
+        explored.push(container);
 
         for (var ct_idx in contents) {
             var to_concat = utils.flatten(getExplicitContents(contents[ct_idx], explored));

+ 4 - 4
client/query_response.js

@@ -25,7 +25,7 @@ function __clearObsoleteChangelogs(pendingChangelogs,sn)
 function __forceNextASWSequenceNumber(sn)
 {
 	__nextASWSequenceNumber = sn;
-	__clearObsoleteChangelogs(__pendingASWChangelogs,sn)
+	__clearObsoleteChangelogs(__pendingASWChangelogs,sn);
 }
 
 
@@ -33,7 +33,7 @@ function __forceNextASWSequenceNumber(sn)
 function __forceNextCSWSequenceNumber(sn)
 {
 	__nextCSWSequenceNumber = sn;
-	__clearObsoleteChangelogs(__pendingCSWChangelogs,sn)
+	__clearObsoleteChangelogs(__pendingCSWChangelogs,sn);
 }
 
 //Todo: Shred this into smaller functions
@@ -48,7 +48,7 @@ function __handleChangelog(changelog,seqNum,hitchhiker)
 {
 	console.debug(' ++ ('+seqNum+') ',changelog);
 
-	var isCSWChangelog 	 = seqNum.match(/csworker/)
+	var isCSWChangelog 	 = seqNum.match(/csworker/);
 		 nextSeqNum 	 	 = 
 			 (isCSWChangelog ? __nextCSWSequenceNumber : __nextASWSequenceNumber),
 		 pendingChangelogs = 
@@ -306,7 +306,7 @@ function __handleChangelog(changelog,seqNum,hitchhiker)
 						function(selection) {
 							__select(selection);
 						}, [__selection['items']], 5
-					)
+					);
 			}
 
 			/* react to loading of an IconDefinition (CS metamodel)

+ 3 - 3
client/selection_utils.js

@@ -216,7 +216,7 @@ function __highlight(uri,followCrossFormalismLinks,timeout,color)
 
 function isHighlighted(uri)
 {
-	return __highlighted.length > 0 && __highlighted.filter(function(hl) {return uri == hl['uri']}).length == 1;
+	return __highlighted.length > 0 && __highlighted.filter(function(hl) {return uri == hl['uri'];}).length == 1;
 }
 
 
@@ -224,11 +224,11 @@ function __unhighlight(uri)
 {
 	if( __highlighted.length > 0 )
 	{
-		__highlighted.filter(function(hl) {return !uri || uri == hl['uri']}).forEach(function(hl) {hl.turnOff()})
+		__highlighted.filter(function(hl) {return !uri || uri == hl['uri'];}).forEach(function(hl) {hl.turnOff();});
 		if (!uri) {
 			__highlighted = [];
 		} else {
-			__highlighted = __highlighted.filter(function(hl) {return uri != hl['uri']})
+			__highlighted = __highlighted.filter(function(hl) {return uri != hl['uri'];});
 		}
 		
 	}

+ 2 - 2
client/window_management.js

@@ -596,7 +596,7 @@ WindowManagement = function(){
 				 c.__trafo = trafo;
 				 c.__msg = msg;
 				if (trafo == undefined){
-					trafo = option
+					trafo = option;
 				}
 				if( tbname ){
 						toolbars = tbname.split(",");
@@ -735,7 +735,7 @@ WindowManagement = function(){
 		if(ev!=null && ev.keyCode==13) {
 			$('#div_dialog_' + (__dialog_stack.length-1).toString() + " .okbutton").click();
 		}
-        __dialog_stack.pop()
+        __dialog_stack.pop();
 		var dialog = $('#div_dialog_'+__dialog_stack.length);
         dialog.remove();
 		if (!__dialog_stack.length) {

+ 4 - 4
httpwsd.js

@@ -434,7 +434,7 @@ var httpserver = _http.createServer(
                                          _fs.unlink(newname);
                                      }
                                 }
-                            _fspp.mv(userdir+"/"+folder+fname,userdir+data,onmove)
+                            _fspp.mv(userdir+"/"+folder+fname,userdir+data,onmove);
                         } else {
                             // rename
                             var matches  = url.pathname.match(/^\/(.*?)\/(.*\/)?(.*)\.(file|folder)$/),
@@ -450,10 +450,10 @@ var httpserver = _http.createServer(
                                          else
                                              __respond(resp,200);
                                      };
-                            _fs.rename(userdir+folder+fname,userdir+folder+data,onrename)
+                            _fs.rename(userdir+folder+fname,userdir+folder+data,onrename);
                         }
                     }
-                )
+                );
 				
 			}
             
@@ -723,7 +723,7 @@ wsserver.sockets.on('connection',
 		  	has no more registered sockets, terminate it */
 		function unregister(wid)
 		{
-			var i = workerIds2socketIds[wid].indexOf(socket.id)
+			var i = workerIds2socketIds[wid].indexOf(socket.id);
 			if( i == -1 )
 				__send(socket,403,'already unregistered from worker');
 			else

+ 8 - 8
libsvg.js

@@ -169,7 +169,7 @@ SVG.types.ATransformable.prototype.transform =
 	function(tstr)
 	{
 		return this.__transform(SVG.fns.__getTransformationMatrix(tstr));
-	}
+	};
 
 /* apply the given transformation matrix to this element */
 SVG.types.ATransformable.prototype.__transform = 
@@ -425,13 +425,13 @@ _utils.extend(SVG.types.LinearPath, SVG.types.ATransformable);
 
 
 /*----------------------------------------------------------------------------*/
-SVG.types.CubicPath = function() {}	//TBC
-SVG.types.Circle		= function() {}	//TBC
-SVG.types.Ellipse	= function() {}	//TBC
-SVG.types.Rectangle	= function() {}	//TBC
-SVG.types.Polygon	= function() {}	//TBC
-SVG.types.Star		= function() {}	//TBC
-SVG.types.Image		= function() {}	//TBC
+SVG.types.CubicPath = function() {};	//TBC
+SVG.types.Circle		= function() {};	//TBC
+SVG.types.Ellipse	= function() {};	//TBC
+SVG.types.Rectangle	= function() {};	//TBC
+SVG.types.Polygon	= function() {};	//TBC
+SVG.types.Star		= function() {};	//TBC
+SVG.types.Image		= function() {};	//TBC
 
 
 

+ 1 - 1
tests/test_utils.js

@@ -102,7 +102,7 @@ function callback(client, load_function, files_to_skip) {
             //console.log(filenames);
             load_function(client, filenames);
         }
-    }
+    };
 }
 
 module.exports = {

+ 1 - 1
types.js

@@ -15,4 +15,4 @@ __specialTypes = {
 	'$ARG':'map<[name,type],[string,string]>',
 	
 	'$METHOD':'map<[name,args,returntype,body],[string,list<$ARG>,string,code]>'
-}
+};

+ 5 - 5
utils.js

@@ -298,7 +298,7 @@ utils.createCookie =
 		}
 		else var expires = "";
 		document.cookie = name+"="+value+expires+"; path=/";
-	}
+	};
 
 /* returns the value of the cookie with given name */
 utils.readCookie =
@@ -311,13 +311,13 @@ utils.readCookie =
 			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
 		}
 		return null;
-	}
+	};
 
 /* erases the cookie with given name */
 utils.eraseCookie =
 	function(name) {
 		createCookie(name,"",-1);
-	}
+	};
 	
 __pendingCalls = {};
 
@@ -334,7 +334,7 @@ utils.doAfterUnlessRepeated =
 			clearTimeout(__pendingCalls[func]);
 		}
 		__pendingCalls[func] = setTimeout(doIt, ms);
-	}
+	};
 
 /* NOTE: 'exports' exists in back-end 'require', but not in browser import...
 			this ensures no errors are reported during browser imports */
@@ -367,4 +367,4 @@ exports.values 						= utils.values;
 exports.createCookie				= utils.createCookie;
 exports.readCookie					= utils.readCookie;
 exports.eraseCookie					= utils.eraseCookie;
-exports.doAfterUnlessRepeated		= utils.doAfterUnlessRepeated
+exports.doAfterUnlessRepeated		= utils.doAfterUnlessRepeated;