JavaScriptSideKick plugin
(c) 2005 by Martin Raspe
Provides a SideKick structure tree for JavaScript source. It is based and depends on the SideKick plugin.
The plugin parses JavaScript source code linewise, using regular expressions. Because of the difficulties in JavaScript parsing, only a very rudimentary representation of the file is shown, providing basic source navigation. The plugin tries to catch idioms containing the "function" keyword. To be caught, the idiom must appear first on the line (leading whitespace is ignored). The plugin scans the code for the following cases:
- a simple function declaration: function foobar() ...
- a function assigned to a variable: foo = function() ...
- a function assigned to a "var": var foo = function() ...
- a function assigned to a method name: foo.bar = function() ...
- a function denoting a Class (name beginning with an uppercase character): Foo = function() ...
- a method assigned to the prototype of a Class: Foo.prototype.bar = function() ...