4
4
Fork 0
This repository has been archived on 2025-01-20. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
json-photoshop-scripting/Utility-Scripts/Parse-JavaScript-Code
2024-02-24 13:35:32 +01:00
..
images First commit 2018-04-15 16:41:40 +02:00
esprima.jsxinc First commit 2018-04-15 16:41:40 +02:00
Parse JavaScript Code.js First commit 2018-04-15 16:41:40 +02:00
README.md Fixed relative links in README.md files 2024-02-24 13:35:32 +01:00

Parse JavaScript Code

Description

“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.

Parse JavaScript Code Dialog (Mac OS X)

If the “Tokenize” checkbox is checked when clicking on the “Parse” button, then the JavaScript code in displayed as a JSON array of tokens.

Parse JavaScript Code Dialog (Mac OS X) - Tokenize

This script uses a slighly modified version of the Esprima parser created and maintained by Ariya Hidayat:

esprima.jsxinc

Requirements

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.

License

This Software is licensed under the GNU General Public License (GPL) v3.

Download

Download Zip File

Installation

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.