Author: gotcha
Date: Tue Aug 28 22:58:14 2007
New Revision: 46111

Modified:
   kukit/kukit.js/branch/commas-in-selectors/kukit/kssparser.js
Log:
indentation

Modified: kukit/kukit.js/branch/commas-in-selectors/kukit/kssparser.js
==============================================================================
--- kukit/kukit.js/branch/commas-in-selectors/kukit/kssparser.js        
(original)
+++ kukit/kukit.js/branch/commas-in-selectors/kukit/kssparser.js        Tue Aug 
28 22:58:14 2007
@@ -145,116 +145,115 @@
 
 kukit.kssp.Block.prototype.addEventDeclaration = function(key, splitkey, 
value) {
 
-        // evt-<EVTNAME>-<PARAMETER>: <VALUE>
-        // evt-<NAMESPACE>-<EVTNAME>-<PARAMETER>: <VALUE>
-;;;     if (splitkey.length < 3) {
-;;;         kukit.E = 'Wrong rule key : "' + key + '". ';
-;;;         kukit.E += 'KSS rule key must be "<ACTIONNAME>-<PARAMETER>"';
-;;;         kukit.E += ' or "<NAMESPACE>-<ACTIONNAME>-<PARAMETER>" or ';
-;;;         kukit.E += '"evt-<EVENTNAME>-<PARAMETER>" or ';
-;;;         kukit.E += '"evt-<NAMESPACE>-<EVENTNAME>-<PARAMETER>".';
-;;;         this.emitError(kukit.E);
-;;;     }
-        var enamespace;
-        var ename;
-        var ekey;
-        if (splitkey.length == 3) {
-            // evt-<EVENTNAME>-<PARAMETER>: <VALUE>
-            ename =  splitkey[1];
-            ekey = splitkey[2];
-        } else {
-            // evt-<NAMESPACE>-<EVENTNAME>-<PARAMETER>: <VALUE>
-            enamespace = splitkey[1];
-            ename = splitkey[2];
-            ekey = splitkey[3];
-        }
-        if (this.evt_name == null) {
-            // This is the first evt- rule, so we set it up
-            // so that we can check it stays the same within the block.
-            this.evt_name = ename;
-            this.evt_namespace = enamespace;
-        } else {
-            if (ename != this.evt_name || enamespace != this.evt_namespace) {
-                return ;
-;;;             // Do not allow deviation from the previous event names.
-;;;             kukit.E = 'Wrong key [' + key + '] : ';
-;;;             kukit.E += 'evt-[<NAMESPACE>-]<EVENTNAME>-<PARAMETER> ';
-;;;             kukit.E += 'keys cannot have different namespace and ';
-;;;             kukit.E += 'event name than in the event selector, ';
-;;;             kukit.E += 'it should have been [';
-;;;             if (this.evt_namespace){
-;;;                 kukit.E += this.evt_namespace + '-';
-;;;             }
-;;;             kukit.E += this.evt_name + '].';
-;;;             this.emitError(kukit.E);
-            }
-        }
-;;;     if (value.isMethod != false) {
-;;;         kukit.E = 'Wrong value for key [' + key + '] : ';
-;;;         kukit.E += 'value providers are not ';
-;;;         kukit.E += 'allowed as value for ';
-;;;         kukit.E += 'evt-[<NAMESPACE>-]<EVENTNAME>-<PARAMETER> keys.';
+    // evt-<EVTNAME>-<PARAMETER>: <VALUE>
+    // evt-<NAMESPACE>-<EVTNAME>-<PARAMETER>: <VALUE>
+;;; if (splitkey.length < 3) {
+;;;     kukit.E = 'Wrong rule key : "' + key + '". ';
+;;;     kukit.E += 'KSS rule key must be "<ACTIONNAME>-<PARAMETER>"';
+;;;     kukit.E += ' or "<NAMESPACE>-<ACTIONNAME>-<PARAMETER>" or ';
+;;;     kukit.E += '"evt-<EVENTNAME>-<PARAMETER>" or ';
+;;;     kukit.E += '"evt-<NAMESPACE>-<EVENTNAME>-<PARAMETER>".';
+;;;     this.emitError(kukit.E);
+;;; }
+    var enamespace;
+    var ename;
+    var ekey;
+    if (splitkey.length == 3) {
+        // evt-<EVENTNAME>-<PARAMETER>: <VALUE>
+        ename =  splitkey[1];
+        ekey = splitkey[2];
+    } else {
+        // evt-<NAMESPACE>-<EVENTNAME>-<PARAMETER>: <VALUE>
+        enamespace = splitkey[1];
+        ename = splitkey[2];
+        ekey = splitkey[3];
+    }
+    if (this.evt_name == null) {
+        // This is the first evt- rule, so we set it up
+        // so that we can check it stays the same within the block.
+        this.evt_name = ename;
+        this.evt_namespace = enamespace;
+    } else {
+        if (ename != this.evt_name || enamespace != this.evt_namespace) {
+            return ;
+;;;         // Do not allow deviation from the previous event names.
+;;;         kukit.E = 'Wrong key [' + key + '] : ';
+;;;         kukit.E += 'evt-[<NAMESPACE>-]<EVENTNAME>-<PARAMETER> ';
+;;;         kukit.E += 'keys cannot have different namespace and ';
+;;;         kukit.E += 'event name than in the event selector, ';
+;;;         kukit.E += 'it should have been [';
+;;;         if (this.evt_namespace){
+;;;             kukit.E += this.evt_namespace + '-';
+;;;         }
+;;;         kukit.E += this.evt_name + '].';
 ;;;         this.emitError(kukit.E);
         }
-        // set it
-        this.eventParameters[ekey] = value.txt;
+    }
+;;; if (value.isMethod != false) {
+;;;     kukit.E = 'Wrong value for key [' + key + '] : ';
+;;;     kukit.E += 'value providers are not ';
+;;;     kukit.E += 'allowed as value for ';
+;;;     kukit.E += 'evt-[<NAMESPACE>-]<EVENTNAME>-<PARAMETER> keys.';
+;;;     this.emitError(kukit.E);
+;;; }
+    this.eventParameters[ekey] = value.txt;
 }
 
 kukit.kssp.Block.prototype.addActionDeclaration = function(key, splitkey, 
value) {
-        // action-server: <ACTIONNAME>
-        // action-client: <ACTIONNAME>
-        // action-client: <NAMESPACE>-<ACTIONNAME>
-        // action-cancel: <ACTIONNAME>
-        // action-cancel: <NAMESPACE>-<ACTIONNAME>
-;;;     if (splitkey.length != 2) {
-;;;         kukit.E = 'Wrong key [' + key + '] : ';
-;;;         kukit.E += 'action-<QUALIFIER> keys can have only one dash.';
-;;;         this.emitError(kukit.E);
-;;;         }
-;;;     if (value.isMethod != false) {
-;;;         kukit.E = 'Wrong value for key [' + key + '] : ';
-;;;         kukit.E += 'value providers are not ';
-;;;         kukit.E += 'allowed for action-<QUALIFIER> keys.';
-;;;         this.emitError(kukit.E);
-;;;         }
-        var atab = {'server': 'S', 'client': 'C', 'cancel': 'X'};
-        var actionType = atab[splitkey[1]];
-;;;     if (! actionType) {
-;;;         kukit.E = 'Wrong key [' + key + '] : ';
-;;;         kukit.E += 'qualifier in action-<QUALIFIER> keys must be ';
-;;;         kukit.E += '"server" or "client" or "cancel".'; 
-;;;         this.emitError(kukit.E);
-;;;         }    
-;;;     // force value to be <ACTIONNAME> or <NAMESPACE>-<ACTIONNAME>
-;;;     var splitvalue = value.txt.split('-');
-;;;     if (splitvalue.length > 2) {
-;;;         kukit.E = 'Wrong value for key [' + key + '] : ';
-;;;         kukit.E += 'value must be <ACTIONNAME> or <NAMESPACE>';
-;;;         kukit.E += '-<ACTIONNAME> for action-<QUALIFIER> keys.';
-;;;         this.emitError(kukit.E);
-;;;         }
-        // set it
-        var action = this.actions.getOrCreateAction(value.txt);
-        if (actionType != 'X' || action.type == null) {
-            action.setType(actionType);
-        } else {
-            this.actions.deleteAction(value.txt);
-        }
+    // action-server: <ACTIONNAME>
+    // action-client: <ACTIONNAME>
+    // action-client: <NAMESPACE>-<ACTIONNAME>
+    // action-cancel: <ACTIONNAME>
+    // action-cancel: <NAMESPACE>-<ACTIONNAME>
+;;; if (splitkey.length != 2) {
+;;;     kukit.E = 'Wrong key [' + key + '] : ';
+;;;     kukit.E += 'action-<QUALIFIER> keys can have only one dash.';
+;;;     this.emitError(kukit.E);
+;;;     }
+;;; if (value.isMethod != false) {
+;;;     kukit.E = 'Wrong value for key [' + key + '] : ';
+;;;     kukit.E += 'value providers are not ';
+;;;     kukit.E += 'allowed for action-<QUALIFIER> keys.';
+;;;     this.emitError(kukit.E);
+;;;     }
+    var atab = {'server': 'S', 'client': 'C', 'cancel': 'X'};
+    var actionType = atab[splitkey[1]];
+;;; if (! actionType) {
+;;;     kukit.E = 'Wrong key [' + key + '] : ';
+;;;     kukit.E += 'qualifier in action-<QUALIFIER> keys must be ';
+;;;     kukit.E += '"server" or "client" or "cancel".'; 
+;;;     this.emitError(kukit.E);
+;;;     }    
+;;; // force value to be <ACTIONNAME> or <NAMESPACE>-<ACTIONNAME>
+;;; var splitvalue = value.txt.split('-');
+;;; if (splitvalue.length > 2) {
+;;;     kukit.E = 'Wrong value for key [' + key + '] : ';
+;;;     kukit.E += 'value must be <ACTIONNAME> or <NAMESPACE>';
+;;;     kukit.E += '-<ACTIONNAME> for action-<QUALIFIER> keys.';
+;;;     this.emitError(kukit.E);
+;;;     }
+    // set it
+    var action = this.actions.getOrCreateAction(value.txt);
+    if (actionType != 'X' || action.type == null) {
+        action.setType(actionType);
+    } else {
+        this.actions.deleteAction(value.txt);
+    }
 }
 
 kukit.kssp.Block.prototype.addActionError = function(key, value) {
-            // <ACTIONNAME>-error: <VALUE>
-            // default-error: <VALUE>
-;;;         if (value.isMethod != false) {
-;;;             kukit.E = 'Wrong value for key [' + key + '] : ';
-;;;             kukit.E += 'value providers are not ';
-;;;             kukit.E += 'allowed for <ACTIONNAME>-error keys.';
-;;;             this.emitError(kukit.E);
-;;;         }
-            action.setError(value.txt);
-            // also create the action for the error itself.
-            var err_action = this.actions.getOrCreateAction(value.txt);
-            err_action.setType('E');
+    // <ACTIONNAME>-error: <VALUE>
+    // default-error: <VALUE>
+;;; if (value.isMethod != false) {
+;;;     kukit.E = 'Wrong value for key [' + key + '] : ';
+;;;     kukit.E += 'value providers are not ';
+;;;     kukit.E += 'allowed for <ACTIONNAME>-error keys.';
+;;;     this.emitError(kukit.E);
+;;; }
+    action.setError(value.txt);
+    // also create the action for the error itself.
+    var err_action = this.actions.getOrCreateAction(value.txt);
+    err_action.setType('E');
 }
 
 kukit.kssp.Block.prototype.addActionParameter = function(name, key, value) {
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to