@Override public ArrayConstructorExpr clone() { List<Expr> newArgs = args.stream().map(Expr::clone).collect(Collectors.toList()); return new ArrayConstructorExpr(arrayType.clone(), newArgs); }
private static Initializer makeInitializer(BasicType baseType, ArrayInfo arrayInfo, List<Number> args) { if (arrayInfo != null) { assert arrayInfo.getSize() * baseType.getNumElements() == args.size(); List<Expr> argExprs = new ArrayList<>(); for (int index = 0; index < arrayInfo.getSize(); index++) { argExprs.add(getBasicTypeLiteralExpr(baseType, args.subList(index * baseType.getNumElements(), (index + 1) * baseType.getNumElements()))); } return new ScalarInitializer(new ArrayConstructorExpr( new ArrayType(baseType.getWithoutQualifiers(), arrayInfo.clone()), argExprs)); } return new ScalarInitializer(getBasicTypeLiteralExpr(baseType, args)); }
args.add(makeExpr(arrayType.getBaseType(), isLValue, constContext, depth + 1)); return new ArrayConstructorExpr((ArrayType) stripQualifiers(targetType), args); } else { throw new FuzzedIntoACornerException();
if (isBuiltinTypeConstructor(header.function_identifier())) { if (header.array_specifier() != null) { return new ArrayConstructorExpr( new ArrayType( getBuiltinType(header.function_identifier().builtin_type_specifier_nonarray()), final StructNameType structType = new StructNameType( header.function_identifier().variable_identifier().getText()); return new ArrayConstructorExpr( new ArrayType(structType, getArrayInfo(header.array_specifier())), params);