Page 1 of 1
Syntax highlighting for D (nested comments, WYSIWYG strings)
Posted: Mon Mar 08, 2004 12:21 pm
by smjg
The
D language has a few syntax features not within TextPad's current highlighting capabilities:
1. Nested comments, specifiable for each style of comment separately:
- /* ... */ - unnestable comment
- /+ ... +/ - nestable comment
2. Multiple kinds of strings:
- " ... " - a C-style string that can contain escaped character sequences
- r" ... " - a WYSIWYG string, i.e. no escapes
- ` ... ` - alternative notation for WYSIWYG string
It would be nice to see these syntaxes supported in TextPad syntax definitions.
Posted: Mon Mar 08, 2004 11:18 pm
by BenjiSmith
It's nice to see someone else who has been exposed to the D programming language. I think it's a great language, and I'd definitely like to see support for it increasing.
Posted: Wed Mar 10, 2004 9:14 am
by ramonsky
Just looked at D myself. It looks pretty amazing.
One thing I noticed was that D uses Unicode source files, allows Unicode identifiers and so on. This is a brilliant advancement, as there is no doubt that Unicode is the future. This observation does, however, bring us back to TextPad's poor performance in handling Unicode text. See
here.
Ramonsky
Posted: Wed Sep 22, 2004 7:32 am
by Kniht
C (and C++) has supported Unicode source for decades (literally!). Just encode it as UTF-8 so all the control characters and words (braces, keywords) are as expected. :P
Posted: Wed Sep 22, 2004 11:20 am
by ramonsky
Just to let you know where the competition is at, JEdit can now do syntax highlighting for D, including wysiwyg strings (but not yet nested comments). See
this post in the D forum by JEdit's author.
What silly bugger voted this as "unimportant"?
Ramonsky
Posted: Wed Sep 22, 2004 12:21 pm
by MudGuard
ramonsky wrote:What silly bugger voted this as "unimportant"?
Probably someone to whom this feature is unimportant ...
Why do you complain?
If the option to vote for "unimportant" is available, there is nothing to be said against using it.
Re: Syntax highlighting for D (nested comments, WYSIWYG stri
Posted: Wed Sep 22, 2004 2:45 pm
by talleyrand
smjg wrote:
2. Multiple kinds of strings:
- " ... " - a C-style string that can contain escaped character sequences
- r" ... " - a WYSIWYG string, i.e. no escapes
- ` ... ` - alternative notation for WYSIWYG string
It would be nice to see these syntaxes supported in TextPad syntax definitions.
I don't think this would be a tough one to implement for Helios. It already has the ability to support Python's string quoting (single or double quote works just as well) which boils down to the above except they do WYSIWYG strings as triple quoted thus '''my big fat string with a line break (imagine it) and more text here'''