Emacs-D-Mode-Maintainers / Emacs-D-Mode

An Emacs mode for D code.
GNU General Public License v3.0
84 stars 22 forks source link

fix the regexp to allow .*[]! in type names #10

Closed finalpatch closed 11 years ago

finalpatch commented 11 years ago

so that template instances, arrays, pointers, and namespace qualifiers are recognized

russel commented 11 years ago

I may be missing something here (very likely!) but !.[]* are not valid characters in type names per se.

finalpatch commented 11 years ago

no they aren't. but this is the regexp to parse stuff like

FOO* FOO[] FOO!BAR FOO.BAR

From the D language point of view, these characters are not part of the type name. But in order for the declaration to be parsed by the regexp, they must go in.

On Tue, Aug 6, 2013 at 11:42 PM, Russel Winder notifications@github.comwrote:

I may be missing something here (very likely!) but !.[]* are not valid characters in type names per se.

— Reply to this email directly or view it on GitHubhttps://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode/pull/10#issuecomment-22179245 .

Feng Li

finalpatch commented 11 years ago

In fact, I think you are right, it's probably better to move these characters out of the capture group so that they don't get the type face. I'll try to fix it.

On Tue, Aug 6, 2013 at 11:49 PM, Feng Li fengli@gmail.com wrote:

no they aren't. but this is the regexp to parse stuff like

FOO* FOO[] FOO!BAR FOO.BAR

From the D language point of view, these characters are not part of the type name. But in order for the declaration to be parsed by the regexp, they must go in.

On Tue, Aug 6, 2013 at 11:42 PM, Russel Winder notifications@github.comwrote:

I may be missing something here (very likely!) but !.[]* are not valid characters in type names per se.

— Reply to this email directly or view it on GitHubhttps://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode/pull/10#issuecomment-22179245 .

Feng Li

Feng Li