}
if (nodeType.hasKeywordParameter(name)) {
Type fieldType = nodeType.getKeywordParameterType(name);
if (!repl.getType().isSubtypeOf(fieldType)) {
throw new UnexpectedType(fieldType, repl.getType(), ctx.getCurrentAST());
}
return makeResult(getType(), getValue().asWithKeywordParameters().setParameter(name, repl.getValue()), ctx);
}
else {
int index = nodeType.getFieldIndex(name);
Type fieldType = nodeType.getFieldType(index);
if (!repl.getType().isSubtypeOf(fieldType)) {
throw new UnexpectedType(fieldType, repl.getType(), ctx.getCurrentAST());
}
return makeResult(getType(), getValue().set(index, repl.getValue()), ctx);
}
}