Print line-suffix in --debug-print-doc (#676)
I was trying to debug #620 and got confused that it didn't show `//comment1`. Turns out we just fail silently if we can't print a node type. I added support for `line-suffix` and throw if we encounter a node type that we can't print.master
parent
c5bfdae5d8
commit
1fed39ae30
|
@ -92,6 +92,12 @@ function printDoc(doc) {
|
|||
printDoc(doc.contents) +
|
||||
")";
|
||||
}
|
||||
|
||||
if (doc.type === "line-suffix") {
|
||||
return "lineSuffix(" + printDoc(doc.contents) + ")";
|
||||
}
|
||||
|
||||
throw new Error('Unknown doc type ' + doc.type);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
Loading…
Reference in New Issue