Using JSDoc with Adobe ExtendScript

I'm developing scripts for Adobe.
Adobe is using it's own language called ExtendScript, which is essentially ECMAScript 3 with custom C-style preprocessor directives starting with the #

#include "file.jsxinc" //includes a file more like require  
#includepath "lib" //tells ESTK to include files that follow from a given folder   
#include "fileFromLibFolder.jsx" //file is included from "lib" folder

As well as some other # directives that may be safely ignored.
JSDoc by default returns an error when it gets to the first #:

Unexpected token ILLEGAL

I was unable to find a ready made JSDoc extension for ExtendScript. Maybe you could point me to a possible solution on how to make JSDoc work for this case?

1 Answer

  1. Cary- Reply


    You should be able to use //@ include instead of #include. Not sure, where this is originally documented, but I found it in this Github post.

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>