1 var jsp = require("./parse-js"),
2 pro = require("./process"),
5 PRECEDENCE = jsp.PRECEDENCE,
6 OPERATORS = jsp.OPERATORS;
8 function ast_squeeze_more(ast) {
9 var w = pro.ast_walker(), walk = w.walk;
10 return w.with_walkers({
11 "call": function(expr, args) {
12 if (expr[0] == "dot" && expr[2] == "toString" && args.length == 0) {
13 // foo.toString() ==> foo+""
14 return [ "binary", "+", expr[1], [ "string", "" ]];
22 exports.ast_squeeze_more = ast_squeeze_more;