patch:Ruby class parser

Tim Harper tim at matchbin.com
Fri Apr 21 00:42:11 UTC 2006


Hello,
Here's a patch to fix the ruby class parser for classes like the following:

class Community::BaseController < ApplicationController

It's a very small fix.  It just adds a : to the list of possible colons 
characters for the class name.


If we wanted to be really strict, we could change the line to the following, 
so kdevelop wouldn't pick up on bad class names, like so:

QRegExp classre("^\\s*(class|module)\\s+(([A-Z][A-Za-z0-9_]+(\\s*::
\\s*)*)*)\\s*(<\\s*([A-Z][A-Za-z0-9_:]+))?$");

But, I decided that added too much complexity, and doesn't really buy us a 
whole lot.  So I opted for the single character patch :)

please apply this to svn.

Thanks,
Tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ruby_parser_class.patch
Type: text/x-diff
Size: 920 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20060421/ccf4c090/attachment.bin>


More information about the KDevelop-devel mailing list