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); }
30 auto _isResolved(ResolvedState* rstate)
const {
return true; }
34 bool operator==(
const OperandList& other)
const {
return operands() == other.operands(); }
36 template<
typename Container>
37 static OperandList fromParameters(
const Container& params) {
38 std::vector<operator_::Operand> ops;
40 for (
const auto& p : params ) {
42 .type = (p.isConstant() ? type::constant(p.type()) : p.type()),
43 .optional = p.default_().has_value(),
44 .default_ = p.default_()};
46 ops.push_back(std::move(op));
53 std::vector<operator_::Operand> _operands;
Definition: operand-list.h:21
Definition: operator.h:194
auto _isResolved(ResolvedState *rstate) const
Definition: operand-list.h:30
std::optional< ID > id
Definition: operator.h:195
auto isEqual(const Type &other) const
Definition: operand-list.h:28
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:99
auto properties() const
Definition: operand-list.h:32