“Parse JavaScript Code” is a syntax utility script using the JSON Action Manager scripting library.
This stand-alone script written in JavaScript opens a resizeable dialog box with two text areas; in the first field, type or paste any JavaScript code, then click the “Parse” button to parse it into an abstract syntax tree (AST) displayed as a JSON object. Basic editing support is provided, i.e., tabulations and new lines can be inserted.
If the “Tokenize” checkbox is checked when clicking on the “Parse” button, then the JavaScript code in displayed as a JSON array of tokens.
This script uses a slighly modified version of the Esprima parser created and maintained by Ariya Hidayat:
This script can be used in Adobe Photoshop CS4 or later. It has been successfully tested in CS4 on Mac OS X, but should be platform agnostic.
This Software is copyright © 2014-2015 by Michel MARIANI.
This Software is licensed under the GNU General Public License (GPL) v3.
Download the Zip file and unzip it.
Move the entire script FOLDER (Parse JavaScript Code Folder
) with its contents into the Presets/Scripts
folder in the default preset location of the Adobe Photoshop application. On next launch, the script will appear in the File>Automate submenu.