title: How to use uglifyjs / uglifyjs2 to parse walk and eval javascript expressions
body: <p>How to parse javascript expressions using <a href="https://github.com/mishoo/UglifyJS2" rel="nofollow">uglifyjs</a> ? Though an excellent library, Lack of documentation makes it more difficult to understand!</p>
  
  <p>These Links helped me to some extent. </p>
  
  <ul>
  <li><a href="https://groups.google.com/forum/?fromgroups=#!topic/uglifyjs/YjWjgl8Qm0c" rel="nofollow">https://groups.google.com/forum/?fromgroups=#!topic/uglifyjs/YjWjgl8Qm0c</a> </li>
  <li><a href="https://github.com/mishoo/UglifyJS/blob/master/tmp/instrument.js" rel="nofollow">https://github.com/mishoo/UglifyJS/blob/master/tmp/instrument.js</a>  </li>
  </ul>
  
  <p>Now I know this is what needs to be done</p>
  
  <ul>
  <li>Parse to generate AST</li>
  <li>create custom Walks </li>
  <li>Translate AST</li>
  <li>Generate code</li>
  <li>Eval generated code</li>
  </ul>
  
  <p>Is this correct? or Am I missing something?</p>
  
  <p>A simple example with walker code to play around would be much helpful and appreciated</p>