Javascript HRC

47 views
Skip to first unread message

xarx

unread,
Feb 7, 2013, 6:24:15 AM2/7/13
to col...@googlegroups.com
Please extend jscript.hrc so that it recognizes javascript functions defined this way:

TabGroupsManager.GroupBarDnDObserver.prototype.createEventListener=function(){
.....
}

I modified jscript.hrc like this:

--- jscript.hrc.orig    2011-09-14 12:47:34.000000000 +0200
+++ jscript.hrc    2013-02-07 10:35:38.693649800 +0100
@@ -103,6 +103,7 @@
          <block start="/\/\//" end="/\M(&lt;\/scr|$)/i" scheme="jComment" region="Comment"/>
          <block start="/\/\*/" end="/\*\//" scheme="jComment" region="Comment" region00="PairStart" region10="PairEnd"/>
          <regexp match="/^\M\s* function \s+ ([\w_]+) /x" region1="Function"/>
+         <regexp match="/\b ([\w_]+) \s* = \s* function\b /x" region1="Function"/>
          <inherit scheme="PairedBrackets">
             <virtual scheme="PairedBrackets" subst-scheme="jScript"/>
          </inherit>

xarx

unread,
Feb 7, 2013, 3:17:00 PM2/7/13
to col...@googlegroups.com

Similarly, many Firefox extensions use the following:
makeNameList:function(){
.....
}

So I extended jscript.hrc to cover even these cases:

Aleksey Dobrunov

unread,
Feb 9, 2013, 7:18:25 AM2/9/13
to col...@googlegroups.com
Hi.
added to the schema. but you forgot \M.
correct line   
<regexp match="/\b ([\w_]+) \s* [=:] \M\s* function\b /x" region1="Function"/>

Aleksey.


2013/2/8 xarx <xa...@zoznam.sk>

--
You received this message because you are subscribed to the Google Groups "Colorer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to colorer+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages