souffle
2.0.2-371-g6315b36
ast
UnnamedVariable.h
Go to the documentation of this file.
1
/*
2
* Souffle - A Datalog Compiler
3
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved
4
* Licensed under the Universal Permissive License v 1.0 as shown at:
5
* - https://opensource.org/licenses/UPL
6
* - <souffle root>/licenses/SOUFFLE-UPL.txt
7
*/
8
9
/************************************************************************
10
*
11
* @file UnnamedVariable.h
12
*
13
* Defines the unnamed variable class
14
*
15
***********************************************************************/
16
17
#pragma once
18
19
#include "
ast/Argument.h
"
20
#include <ostream>
21
22
namespace
souffle::ast
{
23
24
/**
25
* @class UnnamedVariable
26
* @brief Unnamed variable class
27
*/
28
class
UnnamedVariable :
public
Argument {
29
public
:
30
using
Argument::Argument;
31
32
UnnamedVariable*
clone
()
const override
{
33
return
new
UnnamedVariable(
getSrcLoc
());
34
}
35
36
protected
:
37
void
print
(std::ostream& os)
const override
{
38
os <<
"_"
;
39
}
40
};
41
42
}
// namespace souffle::ast
souffle::ast::UnnamedVariable::clone
UnnamedVariable * clone() const override
Create clone.
Definition:
UnnamedVariable.h:38
souffle::ast::UnnamedVariable::print
void print(std::ostream &os) const override
Output to a given output stream.
Definition:
UnnamedVariable.h:43
Argument.h
souffle::ast::Node::getSrcLoc
const SrcLocation & getSrcLoc() const
Return source location of the Node.
Definition:
Node.h:46
souffle::ast
Definition:
Aggregator.h:35
Generated by
1.8.17