projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
edd6335
)
Pman.SearchTokenizer.js
author
Alan Knowles
<alan@akbkhome.com>
Fri, 23 Sep 2011 04:06:15 +0000
(12:06 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Fri, 23 Sep 2011 04:06:15 +0000
(12:06 +0800)
Pman.SearchTokenizer.js
patch
|
blob
|
history
diff --git
a/Pman.SearchTokenizer.js
b/Pman.SearchTokenizer.js
index
ad663e9
..
1a3686d
100644
(file)
--- a/
Pman.SearchTokenizer.js
+++ b/
Pman.SearchTokenizer.js
@@
-105,18
+105,18
@@
Pman.SearchTokenizer.prototype = {
addStr : function (s,q) { //q == quoted..
q = q || false;
addStr : function (s,q) { //q == quoted..
q = q || false;
- s = q ? s :
String
.trim(s);
- if (!s
trlen(s)
) {
+ s = q ? s :
Roo.util.Format
.trim(s);
+ if (!s
.length
) {
return;
}
return;
}
+
if (!q) {
if (!q) {
-
- if ((strtoupper(s) == 'AND') || (strtoupper(s) == 'OR')) {
- this.tokens[] = new Text_SearchParser_Token_Op(strtoupper(s));
+ if ((s..toUpperCase() == 'AND') || (s.toUpperCase() == 'OR')) {
+ this.tokens.push( { type: s.toUpperCase() });
return;
}
}
return;
}
}
- this.tokens
[] = new Text_SearchParser_Token_String(s
);
+ this.tokens
.push( { type : 's' , v : s }
);
}
function getChar()
}
function getChar()