mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
add helper function for debugging parse events
This commit is contained in:
parent
da485dff2c
commit
f1a104eb06
@ -304,6 +304,32 @@ function getBasename(name) {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dump an event to the console.
|
||||
* @private
|
||||
* @memberof module:src/parser.Parser
|
||||
* @param {object} e The event to dump.
|
||||
*/
|
||||
function dumpEvent(e) {
|
||||
for (var prop in e) {
|
||||
// can't use hasOwnProp() on native objects, so let's just make JSHint happy
|
||||
if (e[prop]) {
|
||||
console.log("e." + prop + ": " + e[prop]);
|
||||
// go one level down for e.code
|
||||
if (prop === "code") {
|
||||
for (prop in e.code) {
|
||||
// can't use hasOwnProp() on native objects, so let's just make JSHint happy
|
||||
if (e.code[prop]) {
|
||||
console.log("e.code." + prop + ": " + e.code[prop]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log("\n\n");
|
||||
}
|
||||
|
||||
/** @private */
|
||||
function visitNode(node) {
|
||||
var e,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user