blob: effbfb3e23d033336f1d2392e49871f69ed12950 (
plain) (
blame)
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "keyocc.h"
key_occ::key_occ(const char* term_, off_t spos, off_t stoken, int len) :
MatchElement(spos, stoken),
tokenlen(len),
_term(term_)
{ }
void key_occ::set_valid()
{
_valid = true;
}
void key_occ::add_to_keylist(keylist& kl)
{
key_occ* k = this;
kl.insert(k);
}
void key_occ::dump(std::string& s)
{
s.append(term());
}
|