end-to-end tutorials for adding passes or otherwise extending Compiler?

20 views
Skip to first unread message

bigo

unread,
Apr 19, 2011, 1:01:11 PM4/19/11
to closure-comp...@googlegroups.com
we use Compiler pretty extensively here at Yelp, and I'm interesting in making some modifications to support our particular style guidelines and add functionality.  I'm having trouble finding good/any documentation on the process of adding a pass to the compiler; are there any good resources for that?

just as one (i think, simple) motivational example, our style guidelines require initial capital letter names on-and-only-on constructors.  so i'd like to add a pass that validates that anything that was named with an InitialCapital is indeed marked as an @constructor (and vice versa).  i seem to recall something (maybe enforcing the use of === vs. ==) somewhere, but can't recall where I found that.  if nothing else, i'm looking for a good (english, not java) overview of the programmatic flow of an invocation of the compiler jar.

thanks for any pointers.  btw we love Compiler.

Jay Young

unread,
Apr 19, 2011, 1:26:47 PM4/19/11
to closure-comp...@googlegroups.com
Michael Bolin's book "Closure: The Definitive Guide" has a whole chapter on extending the Compiler.

Oliver Nicholas

unread,
Apr 19, 2011, 2:19:56 PM4/19/11
to closure-comp...@googlegroups.com
well this is awkward...i have that book.

<3


Oliver Phillip Nicholas
http://wonlove.net/

Alan Leung

unread,
Apr 19, 2011, 8:26:41 PM4/19/11
to closure-comp...@googlegroups.com
Hmm The book is what I would suggest as well...

I have written a tutorial to add a simple pass to the compiler internally for new hires / interns. I am not sure if it would have any more information that what Bolin wrote. I could post that on the wiki as well but currently the instructions are too Google specific.
Reply all
Reply to author
Forward
0 new messages