MCPcopy Create free account
hub / github.com/mozilla/rhino / toSource

Method toSource

rhino/src/main/java/org/mozilla/javascript/ast/AstRoot.java:103–113  ·  view source on GitHub ↗
(int depth)

Source from the content-addressed store, hash-verified

101 }
102
103 @Override
104 public String toSource(int depth) {
105 StringBuilder sb = new StringBuilder();
106 for (Node node : this) {
107 sb.append(((AstNode) node).toSource(depth));
108 if (node.getType() == Token.COMMENT) {
109 sb.append("\n");
110 }
111 }
112 return sb.toString();
113 }
114
115 /** A debug-printer that includes comments (at the end). */
116 @Override

Callers 11

assertSourceMethod · 0.95
parseMethod · 0.95
commentInArrayMethod · 0.95
newlineAndCommentsMethod · 0.95
assertSourceMethod · 0.95
visitMethod · 0.45

Calls 3

appendMethod · 0.65
toStringMethod · 0.65
getTypeMethod · 0.45