forked from jhipster/prettier-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprinter.js
More file actions
32 lines (28 loc) · 714 Bytes
/
printer.js
File metadata and controls
32 lines (28 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"use strict";
const { createPrettierDoc } = require("./cst-printer");
// eslint-disable-next-line no-unused-vars
function genericPrint(path, options, print) {
const node = path.getValue();
// console.log(node);
// if (node.comments) {
// console.log(node.type, node.comments);
// }
// node["comments"] = [
// {
// ast_type: "comment",
// value: "// a",
// leading: false,
// trailing: true,
// printed: false
// },
// {
// ast_type: "comment",
// value: "// b",
// leading: true,
// trailing: false,
// printed: false
// }
// ];
return createPrettierDoc(node, options.originalText);
}
module.exports = genericPrint;