aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/vespa/document/select/invalidconstant.h
blob: 8fe0ed22d16e15f95f554b27be45549ed5951f8e (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
27
28
29
30
31
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
 * @class document::select::InvalidConstant
 * @ingroup select
 *
 * @brief Class describing an invalid constant in the select tree.
 *
 * @author H�kon Humberset
 */

#pragma once

#include "node.h"

namespace document::select {

class InvalidConstant : public Node
{
public:
    explicit InvalidConstant(vespalib::stringref value);

    ResultList contains(const Context&) const override { return ResultList(Result::Invalid); }
    ResultList trace(const Context&, std::ostream& trace) const override;
    void print(std::ostream& out, bool verbose, const std::string& indent) const override;
    void visit(Visitor& v) const override;

    Node::UP clone() const override { return wrapParens(new InvalidConstant(_name)); }

};

}