Difference between revisions of "Function lists"

From EditPlus Wiki
Jump to: navigation, search
m
 
(12 intermediate revisions by 11 users not shown)
Line 1: Line 1:
Hull!
+
==JavaScript==
Dis site gets betta every time I visit it.
+
Great work guyz!
+
  
[http://dave.editthispage.com/discuss/msgReader$199 giant ebony mature tits] |
+
Both function pattern regular expressions support partial display using the first tagged expression in the Function Pattern dialog.
[http://dave.editthispage.com/discuss/msgReader$187 whores horny mature milf pic] |
+
[http://dave.editthispage.com/discuss/msgReader$176 mature babes] |
+
[http://dave.editthispage.com/discuss/msgReader$191 mature pantyhose galleries free]
+
  
Hull!
+
^[ \t]*function[ \t](.*\(.*\)).*$
Dis site gets betta every time I visit it.
+
^[ \t]*([^:=]+[:=] function ?\(.*\)).*
Great work guyz!
+
  
[http://dave.editthispage.com/discuss/msgReader$199 giant ebony mature tits] |
+
These expressions will find functions of the following forms in your file:
[http://dave.editthispage.com/discuss/msgReader$187 whores horny mature milf pic] |
+
 
[http://dave.editthispage.com/discuss/msgReader$176 mature babes] |
+
function foobarspaz(arg1, arg2) {}
[http://dave.editthispage.com/discuss/msgReader$191 mature pantyhose galleries free]
+
foobarspaz: function(arg1, arg2) {}
 +
foobarspaz = function(arg1, arg2) {}
  
 
==PHP5==
 
==PHP5==

Latest revision as of 21:24, 25 March 2010

JavaScript

Both function pattern regular expressions support partial display using the first tagged expression in the Function Pattern dialog.

^[ \t]*function[ \t](.*\(.*\)).*$
^[ \t]*([^:=]+[:=] function ?\(.*\)).*

These expressions will find functions of the following forms in your file:

function foobarspaz(arg1, arg2) {}
foobarspaz: function(arg1, arg2) {}
foobarspaz = function(arg1, arg2) {}

PHP5

When using classes in PHP5 the function keyword can be preceded by "public", "private" or "protected". The following updated regex takes account of this change from PHP4. If you don't know why you might need this, then you probably don't.

^[ \t]*(public[ \t]|protected[ \t]|private[ \t]|)[ \t]*function[ \t].*\([^;]*$

To also show classes in the function list use the following:

^[ \t]*((public[ \t]|protected[ \t]|private[ \t]|)[ \t]*function[ \t].*\()|(class[ \t].*\{)[^;]*$