简单JS代码压缩器

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

               }                    
           //处理转义字符
           } else if(codeArr[i] == this._escape){    
               htmlTxt[htmlTxt.length] = codeArr[i]; 
               if(i<word_index-1){
                   if(codeArr[i+1].charCodeAt(0)>=32&&codeArr[i+1].charCodeAt(0)<=127){
                       htmlTxt[htmlTxt.length] = codeArr[i+1].substr(0,1);
                       htmlTxt[htmlTxt.length] = codeArr[i+1].substr(1);
                       i=i+1;
                   }
               }            
           //处理多行注释的开始
           } else if (!slash_slash_comment_opened && !slash_star_comment_opened&&!quote_opened&&this.isStartWith(this._commentOn,codeArr,i)){                                             
               slash_star_comment_opened = true;
               if(!this._deleteComment){
                   htmlTxt[htmlTxt.length] = this._commentOn;
               }
               i = i + this.getSkipLength(this._commentOn);    
           //处理单行注释