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