souffle
2.0.2-371-g6315b36
ast
NilConstant.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 NilConstant.h
12
*
13
* Defines Nil constant class
14
*
15
***********************************************************************/
16
17
#pragma once
18
19
#include "
ast/Constant.h
"
20
#include "
parser/SrcLocation.h
"
21
#include <string>
22
#include <utility>
23
24
namespace
souffle::ast
{
25
26
/**
27
* @class NilConstant
28
* @brief Defines the nil constant
29
*/
30
class
NilConstant :
public
Constant {
31
public
:
32
NilConstant
(SrcLocation loc = {}) :
Constant
(
"nil"
, std::move(loc)) {}
33
34
NilConstant
*
clone
()
const override
{
35
return
new
NilConstant
(
getSrcLoc
());
36
}
37
};
38
39
}
// namespace souffle::ast
SrcLocation.h
Constant.h
souffle::ast::Constant::Constant
Constant(std::string value, SrcLocation loc={})
Definition:
Constant.h:57
souffle::ast::NilConstant::clone
NilConstant * clone() const override
Create clone.
Definition:
NilConstant.h:40
souffle::ast::Node::getSrcLoc
const SrcLocation & getSrcLoc() const
Return source location of the Node.
Definition:
Node.h:46
souffle::ast
Definition:
Aggregator.h:35
souffle::ast::NilConstant::NilConstant
NilConstant(SrcLocation loc={})
Definition:
NilConstant.h:38
Generated by
1.8.17