added print_to_string helper method
This commit is contained in:
parent
8d233c38d4
commit
a8e49f1536
|
|
@ -296,6 +296,12 @@ function OutputStream(options) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
AST_Node.DEFMETHOD("print_to_string", function(options){
|
||||||
|
var s = OutputStream(options);
|
||||||
|
this.print(s);
|
||||||
|
return s.get();
|
||||||
|
});
|
||||||
|
|
||||||
function PARENS(nodetype, func) {
|
function PARENS(nodetype, func) {
|
||||||
nodetype.DEFMETHOD("needs_parens", func);
|
nodetype.DEFMETHOD("needs_parens", func);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user