Spicy
hilti
toolchain
include
ast
expressions
void.h
1
// Copyright (c) 2020-now by the Zeek Project. See LICENSE for details.
2
3
#pragma once
4
5
#include <memory>
6
#include <utility>
7
8
#include <hilti/ast/expression.h>
9
#include <hilti/ast/type.h>
10
#include <hilti/ast/types/void.h>
11
12
namespace
hilti::expression {
13
15
class
Void
:
public
Expression
{
16
public
:
17
QualifiedType
*
type
() const final {
return
child<QualifiedType>(0); }
18
19
static
auto
create(
ASTContext
* ctx,
const
Meta
&
meta
= {}) {
20
return
ctx->
make
<Void>(ctx, {
QualifiedType::create
(ctx, type::Void::create(ctx,
meta
), Constness::Const)},
21
meta
);
22
}
23
24
protected
:
25
Void(ASTContext* ctx, Nodes
children
, Meta
meta
)
26
: Expression(ctx, NodeTags, std::move(
children
), std::move(
meta
)) {}
27
28
HILTI_NODE_1(expression::Void, Expression,
final
);
29
};
30
31
}
// namespace hilti::expression
hilti::ASTContext
Definition:
ast-context.h:121
hilti::ASTContext::make
T * make(Args &&... args)
Definition:
ast-context.h:366
hilti::Expression
Definition:
expression.h:15
hilti::Meta
Definition:
meta.h:30
hilti::Node::children
const auto & children() const
Definition:
node.h:364
hilti::Node::meta
const auto & meta() const
Definition:
node.h:306
hilti::QualifiedType
Definition:
type.h:362
hilti::QualifiedType::create
static auto create(ASTContext *ctx, UnqualifiedType *t, Constness const_, Meta m=Meta())
Definition:
type.h:427
hilti::expression::Void
Definition:
void.h:15
hilti::expression::Void::type
QualifiedType * type() const final
Definition:
void.h:17
Generated by
1.9.1