I am trying to do function matching in my language .plist file and am 
running into a problem. I want to match two very different types of 
'functions' and I'm not sure if it's possible.


function fooBar() { .. }

fooBar = function() { .. }


The issue seems to be two named subpatterns. BBEdit needs the names to fill 
out the function list, but I can't use the same subpattern name twice.


Is this even possible?


Here is my somewhat simplified pattern matching...


<key>Function Pattern</key>

<string><![CDATA[

(?x:

    (^[ \t]+(?P<function_name>[a-zA-Z0-9_]+)[ \t]*=[ \t]*function[ \t]*\() |

    (^[ \t]+function(?P<function_name>[a-zA-Z0-9_]+)[ \t]*\()

)

]]> </string>



-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to