-
-
Save bjornharrtell/2901844 to your computer and use it in GitHub Desktop.
Yup. Actually saw this shortly after I posted that line in the other gist, and thought I had commented but it wasn't until I saw your comment that I realized I had never sent it. This is much more consistent than the other one, so kudos . Will be using this for now. Thanks.
With following valid CoffeeScript code:
class Jola
constructor: (@misio) ->
console.log @misio
I get:
ctags: Warning: a.coffee:2: null expansion of name pattern "\3"
This regex does not parse functions containing underscores.
The rest works for me though....
I'm not good enough with regex to change yours to accept underscores in function names.
It would be highly appreciated if you'd add this :)
@Tyderion I think I fixed that, take a look at my fork.
@Gonzih / @Tyderion / @bjornharrtell - I have updated this gist to cover more cases, and documented those cases in my fork: https://gist.github.com/jesstelford/6134172
Updated with better regexp to get fields defined in constructor thanks to osse at #regex which least avoids repeating inside patterns and will match up to 11 fields defined in constructor. It would of course be nicer to get all matches with one pattern but I don't see how that's possible, at least with http://ctags.sourceforge.net/ which seem to be the defacto implementation of ctags. (I think it does not support the g flag for regex, which might be what is needed here)