X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Pman.SearchTokenizer.js;h=7e839ed16bddb69c1ce5699a3338acb23535f299;hb=c8365fc930e7fc62e1599cc66f764c30d15da8ca;hp=a55605de4d1d94332edee43d93e61056d311b529;hpb=43f606106d1c034d4a410347c3862fcda6af5a02;p=Pman.Core diff --git a/Pman.SearchTokenizer.js b/Pman.SearchTokenizer.js index a55605de..7e839ed1 100644 --- a/Pman.SearchTokenizer.js +++ b/Pman.SearchTokenizer.js @@ -54,10 +54,11 @@ Pman.SearchTokenizer.prototype = { }, strParse : function () { - - str = ''; + var c; + var str = ''; while(true) { - if (false === (c = this.getChar())) { + c = this.getChar(); + if (false === c) { this.addStr(str); return; } @@ -68,7 +69,7 @@ Pman.SearchTokenizer.prototype = { case '(': case ')': this.addStr(str); this.ungetChar(); return; case '"': - if (strlen(str)) { + if (str.length) { this.addStr(str); str = ''; } @@ -76,17 +77,20 @@ Pman.SearchTokenizer.prototype = { break; default : - str .= c; + str += c; continue; } } - } - function strParseQuoted(end) + }, + + strParseQuoted: function (end) { - str = ''; /// ignore \" slashed ??? + var str = ''; /// ignore \" slashed ??? + var c; while(true) { - if (false === (c = this.getChar())) { + c = this.getChar(); + if (false === c) { this.addStr(str,true); return; } @@ -94,7 +98,7 @@ Pman.SearchTokenizer.prototype = { this.addStr(str,true); return; } - str .= c; + str += c; } }