title: Use PEG.js generated parser to beautify code
body: <p>I want to create a formatter/linter for a custom program language and was reading about it but seems that im missing something.</p>
  
  <p>Was looking/playing with <code>PEG.js</code> and seems that it will do the work. Ive wrote a small parser and when ran - it correctly returns the syntax tree (<code>AST</code>)</p>
  
  <p>And the main question now is: how to use the generated parser to create (for example) a <code>VSCode</code>/<code>Atom</code>/<code>CodeMirror</code>/etc. extension(s) that will beautify/format the code? </p>
  
  <p>Is this the right approach in general? (using a parser or need to write specific parsers for each tool)</p>