8 #include <hilti/ast/declarations/parameter.h> 9 #include <hilti/ast/operator.h> 10 #include <hilti/ast/type.h> 23 OperandList(std::vector<operator_::Operand> operands) : _operands(std::move(operands)) {}
25 const auto& operands()
const {
return _operands; }
28 auto isEqual(
const Type& other)
const {
return node::isEqual(
this, other); }
32 bool operator==(
const OperandList& other)
const {
return operands() == other.operands(); }
34 static OperandList fromParameters(
const std::vector<declaration::Parameter>& params) {
35 std::vector<operator_::Operand> ops;
37 for (
const auto& p : params ) {
39 .type = type::setConstant(p.type(), p.isConstant()),
40 .optional = p.default_().has_value(),
41 .default_ = p.default_()};
43 ops.push_back(std::move(op));
50 std::vector<operator_::Operand> _operands;
Definition: operand-list.h:21
Definition: operator.h:178
std::optional< ID > id
Definition: operator.h:179
auto isEqual(const Type &other) const
Definition: operand-list.h:28
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:83
auto properties() const
Definition: operand-list.h:30