JSDOC/CompressWhite.js
authoralan <alan@alanfast.akbkhome.com>
Mon, 19 Apr 2010 05:16:52 +0000 (13:16 +0800)
committeralan <alan@alanfast.akbkhome.com>
Mon, 19 Apr 2010 05:16:52 +0000 (13:16 +0800)
JSDOC/CompressWhite.js

index e8331bb..8dc67a2 100644 (file)
@@ -210,24 +210,21 @@ CompressWhite =  function (ts, packer)
     out.length = ts.slen; // prealloc.
     out = '';
     while (true) {
-        var tok = ts.next();
+        var tok = ts.nextTok();
         if (!tok) {
             break;
         }
-        if (tok._isWS) {
-            continue;
-        }
         
         
-        if (tok.isTypeN(Script.TOKidentifier) && tok.identifier && tok.identifier.mungedValue.length) {
+        if (tok.type == "NAME"  && tok.identifier && tok.identifier.mungedValue.length) {
             //f.write(tok.identifier.mungedValue);
-            out +=tok.identifier.mungedValue;
+            out += tok.identifier.mungedValue;
             continue;
         }
         
         // at this point we can apply a text translation kit...
         
-        if (tok.type == 'string') {
+        if (tok.type == 'STRN') && (tok.name== 'DOUBLE_QUOTE') {
             if (packer.stringHandler) {
                 out += packer.stringHandler(tok);
                 continue;