Lines Matching defs:args
794 std::vector<std::unique_ptr<Expression>> args;
795 args.push_back(std::move(expr));
799 return this->call(Position(), std::move(ctor), std::move(args));
801 std::vector<std::unique_ptr<Expression>> args;
802 args.push_back(std::move(expr));
803 return std::unique_ptr<Expression>(new Constructor(Position(), type, std::move(args)));
1227 std::vector<std::unique_ptr<Expression>> args) {
1229 if (args.size() != 1) {
1232 to_string((uint64_t) args.size()) + ")");
1235 if (type == *fContext.fFloat_Type && args.size() == 1 &&
1236 args[0]->fKind == Expression::kIntLiteral_Kind) {
1237 int64_t value = ((IntLiteral&) *args[0]).fValue;
1240 if (args[0]->fKind == Expression::kIntLiteral_Kind && (type == *fContext.fInt_Type ||
1244 ((IntLiteral&) *args[0]).fValue,
1247 if (args[0]->fType == *fContext.fBool_Type) {
1251 new TernaryExpression(position, std::move(args[0]),
1256 if (!args[0]->fType.isNumber()) {
1259 args[0]->fType.description() + "')");
1262 return std::unique_ptr<Expression>(new Constructor(position, std::move(type), std::move(args)));
1279 std::vector<std::unique_ptr<Expression>> args) {
1281 if (type.kind() == Type::kMatrix_Kind && args.size() == 1 &&
1282 args[0]->fType.kind() == Type::kMatrix_Kind) {
1285 std::move(args)));
1289 if (args.size() != 1 || expected != component_count(args[0]->fType) ||
1290 type.componentType().isNumber() != args[0]->fType.componentType().isNumber()) {
1291 for (size_t i = 0; i < args.size(); i++) {
1292 if (args[i]->fType.kind() == Type::kVector_Kind) {
1294 args[i]->fType.componentType().isNumber()) {
1295 fErrors.error(position, "'" + args[i]->fType.description() + "' is not a valid "
1300 actual += args[i]->fType.columns();
1301 } else if (args[i]->fType.kind() == Type::kScalar_Kind) {
1304 args[i] = this->coerce(std::move(args[i]), type.componentType());
1305 if (!args[i]) {
1310 fErrors.error(position, "'" + args[i]->fType.description() + "' is not a valid "
1322 return std::unique_ptr<Expression>(new Constructor(position, std::move(type), std::move(args)));
1328 std::vector<std::unique_ptr<Expression>> args) {
1331 if (args.size() == 1 && args[0]->fType == type) {
1333 return std::move(args[0]);
1336 return this->convertNumberConstructor(position, type, std::move(args));
1339 for (size_t i = 0; i < args.size(); i++) {
1340 args[i] = this->coerce(std::move(args[i]), base);
1341 if (!args[i]) {
1346 std::move(args)));
1348 return this->convertCompoundConstructor(position, type, std::move(args));