(tree)
| 1403 | } |
| 1404 | |
| 1405 | static toDTS(tree) { |
| 1406 | let output = ''; |
| 1407 | |
| 1408 | if (tree.version) { |
| 1409 | output += `/dts-${tree.version}/;\n\n`; |
| 1410 | } |
| 1411 | |
| 1412 | for (const [, node] of Object.entries(tree.nodes)) { |
| 1413 | output += DTSParser.nodeToString(node, 0); |
| 1414 | } |
| 1415 | |
| 1416 | return output; |
| 1417 | } |
| 1418 | |
| 1419 | static nodeToString(node, indent = 0) { |
| 1420 | const indentStr = '\t'.repeat(indent); |
nothing calls this directly
no test coverage detected