33 "(expected %zu elements, but found %d)",
43 String::printf(
"construction of struct type '%s' with atomic member is not allowed",
49 for (
int index=0; index<
args.size(); ++index) {
50 std::unique_ptr<Expression>& argument =
args[index];
66 for (
int index = 0; index <
args.size(); ++index) {
67 const std::unique_ptr<Expression>& argument =
args[index];
68 const Field& field =
type.fields()[index];
69 if (!argument->type().matches(*field.
fType)) {
84 return std::make_unique<ConstructorStruct>(
pos,
type, std::move(
args));
#define SkASSERTF(cond, fmt,...)
constexpr size_t SkToSizeT(S x)
static std::unique_ptr< Expression > Make(const Context &context, Position pos, const Type &type, ExpressionArray args)
static std::unique_ptr< Expression > Convert(const Context &context, Position pos, const Type &type, ExpressionArray args)
void error(Position position, std::string_view msg)
const Type & type() const
bool isAllowedInES2(const Context &context) const
std::unique_ptr< Expression > coerceExpression(std::unique_ptr< Expression > expr, const Context &context) const
virtual SkSpan< const Field > fields() const
std::string description() const override
virtual bool isOrContainsAtomic() const
std::string displayName() const
virtual bool isStruct() const
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
static bool arguments_match_field_types(const ExpressionArray &args, const Type &type)