function error(messages) {
	return messages.map(message => ({
		...message,
		message:
			"Expected an assignment or function call and instead saw an expression.",
	}));
}
Helper function to create error messages for test cases.
@param {Array<Object>} messages Array of message objects to format
@returns {Array<Object>} Formatted error messages