// Copyright (c) 2020-now by the Zeek Project. See LICENSE for details. #pragma once #include #include #include #include #include namespace hilti::expression { /** AST node for a constructor expression. */ class Ctor : public Expression { public: auto ctor() const { return child(0); } QualifiedType* type() const final { return ctor()->type(); } static auto create(ASTContext* ctx, hilti::Ctor* ctor, Meta meta = {}) { return ctx->make(ctx, {ctor}, std::move(meta)); } protected: Ctor(ASTContext* ctx, Nodes children, Meta meta) : Expression(ctx, NodeTags, std::move(children), std::move(meta)) {} HILTI_NODE_1(expression::Ctor, Expression, final); }; } // namespace hilti::expression