p5 source code --> YUIDoc JSON --> Tern defs JSON
Because p5.js uses YUIDoc to generate documentation, I'm using @angelozerr's tern.yuidoc plugin to generate a Tern.js defs file for p5.js. Ultimately, this will be used to implement code hints and autocomplete in the p5.js web editor.