[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-source-highlight] [patch] highlighting usertypes started with
From: |
Lorenzo Bettini |
Subject: |
Re: [Help-source-highlight] [patch] highlighting usertypes started with `_' |
Date: |
Mon, 02 May 2011 15:40:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 |
Hi
thanks for the report; actually _ should be used also for detecting
variable name, so the complete diff is
(usertype,usertype,normal) =
-`([[:alpha:]](?:[^[:punct:][:space:]]|[_])*)
+`([[:alpha:]_](?:[^[:punct:][:space:]]|[_])*)
((?:<.*>)?)
-(\s+(?=[*&]*[[:alpha:]][^[:punct:][:space:]]*\s*[[:punct:]\[\]]+))`
+(\s+(?=[*&]*[[:alpha:]_][^[:punct:][:space:]]*\s*[[:punct:]\[\]]+))`
you can find it in git
cheers
Lorenzo
On 05/01/2011 04:06 AM, Masatake YAMATO wrote:
Hi,
In C program usertypes started with `_' are not highlighted expectedly.
e.g.
typedef i __i;
__i j = 1;
here __i is not recognized as usertype.
Usetype started with _ is popular in linux kernel.
2011-05-01 Masatake YAMATO<address@hidden>
* src/clike_vardeclaration.lang: Accept a usertype started with _.
diff --git a/src/clike_vardeclaration.lang b/src/clike_vardeclaration.lang
index 620c45f..bbee078 100644
--- a/src/clike_vardeclaration.lang
+++ b/src/clike_vardeclaration.lang
@@ -1,4 +1,4 @@
(usertype,usertype,normal) =
-`([[:alpha:]](?:[^[:punct:][:space:]]|[_])*)
+`([[:alpha:]_](?:[^[:punct:][:space:]]|[_])*)
((?:<.*>)?)
(\s+(?=[*&]*[[:alpha:]][^[:punct:][:space:]]*\s*[[:punct:]\[\]]+))`
_______________________________________________
Help-source-highlight mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-source-highlight
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Help-source-highlight] [patch] highlighting usertypes started with `_',
Lorenzo Bettini <=