D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Not OT, but apropos of nothing

 

On 24/08/13 08:15, wes wrote:
On Sat, 24 Aug 2013, bad apple wrote:

On 24/08/13 04:55, wes wrote:

okay.  i wonder, though, if the source couldn't be processed into
something more accessible than the source itself.

I've read this a hundred times...

I still don't understand!

oh noes!  maybe it really is utter nonsense.

it is verr pritteh tree of functions, depicting what functions are
called by what other functions.  given an html document with some
javascriptses, can i haz it?

or can the relative scopes of variables be depicted as a collection of
trees?

maybe these sorts of things would be less illuminating than i imagine.

These things can be illuminating but on anything slightly complex they get a bit spaghetti quickly. There is UglifyJS which apparently contains an API so you could have a look at that for parsing the JS and getting the info you need and rather than making an overcomplicated graph simple HTML with links to the caller and callee etc, scope could be covered by indentation and colour? There is of course the chicken and egg problem - if you understand coding the above is unnecessary and if you don't it wont really make it a lot clearer. I think JSlint can tell you how bad some of your code is so you can fix it and COMMENT IT! Must try that myself sometime!
Tom te tom te tom

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq