Spicy
hilti
toolchain
include
ast
expressions
move.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/bool.h>
11
12
namespace
hilti::expression {
13
15
class
Move
:
public
Expression
{
16
public
:
17
auto
expression()
const
{
return
child<Expression>(0); }
18
19
QualifiedType
*
type
() const final {
return
expression()->type(); }
20
21
static
auto
create(
ASTContext
* ctx,
Expression
* expression,
Meta
meta
= {}) {
22
return
ctx->
make
<Move>(ctx, {expression}, std::move(
meta
));
23
}
24
25
protected
:
26
Move(ASTContext* ctx, Nodes
children
, Meta
meta
)
27
: Expression(ctx, NodeTags, std::move(
children
), std::move(
meta
)) {}
28
29
HILTI_NODE_1(expression::Move, Expression,
final
);
30
};
31
32
}
// 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::expression::Move
Definition:
move.h:15
hilti::expression::Move::type
QualifiedType * type() const final
Definition:
move.h:19
Generated by
1.9.1