blob: 38c52c71a47001f94e27bb0d26a656e1a2731b1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
class Query
{
var word : string;
var or : boolean;
var not : boolean;
var raw : boolean;
function constructor ()
{
this.word = '';
this.or = false;
this.not = false;
this.raw = false;
}
override function toString () : string
{
var result = [] : string[];
if (this.or)
{
result.push("OR ");
}
if (this.not)
{
result.push("-");
}
if (this.raw)
{
result.push('"', this.word, '"');
}
else
{
result.push(this.word);
}
return result.join('');
}
}
|