Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[atf-dev] def points for JavaScript?

I guess that Javascript can be parsed into at least a tree of outer definition
points
 var foo = function() {  // here is foo
foo.bar = "hi"; }
 var baz = foo.bar;  // here is baz, but foo() must run for valid def
 var bax = bar.foo;  // here is bax, but bar must come from somewhere
Is there or could there be a map of token->def-points ?

A class of Javascript bugs are "<x> is not defined"; it could mean
 1) <x> should have been <y>
 2) <x> requires inclusion of <s> that defs <x>
 3) <x> requires <f> to run to def <x>
It would be handy to search for <x> quickly to resolve these kinds of
errors.  A token->def-point map would be very handy for this purpose.

Any such?
John.

--
______________________________________________________
John J. Barton email: johnjbarton<at>johnjbarton.com http://www.johnjbarton.com



Back to the top