aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/vespa/document/select/invalidconstant.cpp
blob: a12e9cb88a3574577c401bae7f6bc1ef855b2998 (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
32
33
34
35
36
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "invalidconstant.h"
#include "visitor.h"
#include <ostream>

namespace document::select {

InvalidConstant::InvalidConstant(vespalib::stringref value)
    : Node(value)
{ }

ResultList
InvalidConstant::trace(const Context&, std::ostream& ost) const
{
    ost << "InvalidConstant - " << Result::Invalid << ".\n";
    return ResultList(Result::Invalid);
}


void
InvalidConstant::visit(Visitor &v) const
{
    v.visitInvalidConstant(*this);
}


void
InvalidConstant::print(std::ostream& out, bool, const std::string&) const
{
    if (_parentheses) out << '(';
    out << _name;
    if (_parentheses) out << ')';
}

}