Académique Documents
Professionnel Documents
Culture Documents
* message.
* @property {Function} [fix] The function to call that creates a fix command.
*/
/**
*/
//------------------------------------------------------------------------------
// Module Definition
//------------------------------------------------------------------------------
/**
*/
function normalizeMultiArgReportCall() {
if (arguments.length === 1) {
return {
node: arguments[0],
message: arguments[1],
data: arguments[2],
fix: arguments[3]
};
// Otherwise, the arguments are interpreted as [node, loc, message, data, fix].
return {
node: arguments[0],
loc: arguments[1],
message: arguments[2],
data: arguments[3],
fix: arguments[4]
};
/**
* Asserts that either a loc or a node was provided, and the node is valid if it was
provided.
* @returns {void}
* @throws AssertionError if neither a node nor a loc was provided, or if the node is not
an object
*/
function assertValidNodeInfo(descriptor) {
if (descriptor.node) {