projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
43f6061
)
Pman.SearchTokenizer.js
author
Alan Knowles
<alan@akbkhome.com>
Fri, 23 Sep 2011 04:03:05 +0000
(12:03 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Fri, 23 Sep 2011 04:03:05 +0000
(12:03 +0800)
Pman.SearchTokenizer.js
patch
|
blob
|
history
diff --git
a/Pman.SearchTokenizer.js
b/Pman.SearchTokenizer.js
index
a55605d
..
7e839ed
100644
(file)
--- a/
Pman.SearchTokenizer.js
+++ b/
Pman.SearchTokenizer.js
@@
-54,10
+54,11
@@
Pman.SearchTokenizer.prototype = {
},
strParse : function ()
{
},
strParse : function ()
{
-
- str = '';
+ var c;
+
var
str = '';
while(true) {
while(true) {
- if (false === (c = this.getChar())) {
+ c = this.getChar();
+ if (false === c) {
this.addStr(str);
return;
}
this.addStr(str);
return;
}
@@
-68,7
+69,7
@@
Pman.SearchTokenizer.prototype = {
case '(':
case ')': this.addStr(str); this.ungetChar(); return;
case '"':
case '(':
case ')': this.addStr(str); this.ungetChar(); return;
case '"':
- if (str
len(str)
) {
+ if (str
.length
) {
this.addStr(str);
str = '';
}
this.addStr(str);
str = '';
}
@@
-76,17
+77,20
@@
Pman.SearchTokenizer.prototype = {
break;
default :
break;
default :
- str
.
= c;
+ str
+
= c;
continue;
}
}
continue;
}
}
- }
- function strParseQuoted(end)
+ },
+
+ strParseQuoted: function (end)
{
{
- str = ''; /// ignore \" slashed ???
+ var str = ''; /// ignore \" slashed ???
+ var c;
while(true) {
while(true) {
- if (false === (c = this.getChar())) {
+ c = this.getChar();
+ if (false === c) {
this.addStr(str,true);
return;
}
this.addStr(str,true);
return;
}
@@
-94,7
+98,7
@@
Pman.SearchTokenizer.prototype = {
this.addStr(str,true);
return;
}
this.addStr(str,true);
return;
}
- str
.
= c;
+ str
+
= c;
}
}
}
}