From: Marcio M. <mq...@ma...> - 2003-05-14 14:13:12
|
I think I created my own CaseSensitivEWordRule for that. You must unread the chars that you read if you can't do a full match. That's where your problem is. marcio | -----Original Message----- | From: edt...@li... | [mailto:edt...@li...]On Behalf Of Dave Makalsky | Sent: May 13, 2003 6:17 PM | To: edt | Subject: [Edt-devel] More editor work | | | Hi: | | The syntax hghlighting is 99% complete. I am still getting some | problems creating a detector for types in eiffel. | | According to NICE, a type should be a capital letter followed by a | sequence of capital letters, digits, and underscores. | | More formally: (A,...,Z) {(A,...,Z),(0,...,9), _)}* | | Using a simple TypeDetector which extends WordDetector is giving me | problems. | | Basically, there are two methods I need to implement: | | isWordStart(char) : boolean -- beginning of word | | isWordPart(char) : boolean --part of word | | So I naively implement isWordStart to return true if it's a capital | letter and isWordStart returns true if it's a capital letter, number or | underscore. | | | However, the result is as follows: | | ABC, C9_, gets highlighted | | aBC does not get highlighted | | but Abc results in the 'A' getting highlighted. | | Do I need to subclass WordRule? | | | Please advise, | | DM | | | | | ------------------------------------------------------- | Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara | The only event dedicated to issues related to Linux enterprise solutions | www.enterpriselinuxforum.com | | _______________________________________________ | Edt-devel mailing list | Edt...@li... | https://lists.sourceforge.net/lists/listinfo/edt-devel | |