简单JS代码压缩器

2019-06-03 18:43:24于海丽

                   this._tabNum--;
                   if(i<word_index&&codeArr[i+1]!=this._rowEnd){
                       htmlTxt[htmlTxt.length] = "n" + this.getIdent() + codeArr[i];
                   }else{
                       htmlTxt[htmlTxt.length] = "n" + this.getIdent() + codeArr[i];
                   }
               }else{
                   if(i<word_index&&codeArr[i+1]!=this._rowEnd){
                       htmlTxt[htmlTxt.length] = codeArr[i] + this._rowEnd;
                   }else{
                       htmlTxt[htmlTxt.length] = codeArr[i];
                   }
               }
           //处理关键字
           } else if (!slash_slash_comment_opened&&!slash_star_comment_opened && !quote_opened && this.isBlockElement(codeArr[i])){     
               htmlTxt[htmlTxt.length] = codeArr[i];
           //处理内置对象(后面加一个空格)
           } else if (!slash_slash_comment_opened&&!slash_star_comment_opened && !quote_opened && this.isSingleEyeElement(codeArr[i])){    
               if(codeArr[i]==this._in){
                   htmlTxt[htmlTxt.length] = " ";