Reviewing syntax highlight support in cgdb

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Sun Nov 15 09:41:19 PST 2015


On 15 November 2015 at 17:02, Jacob Carlborg via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On 2015-11-14 11:44, Iain Buclaw wrote:
>
>> Hi,
>>
>> I'm currently making changes to cgdb, and would like to have someone
>> give a quick view over the lexer rules.
>>
>> https://github.com/cgdb/cgdb/blob/master/lib/tokenizer/dlexer.l
>>
>> Having a skim over myself, I see @nogc needs adding, and probably
>> c_long, cpp_long and other ABI compatibility types that the compiler
>> recognises.
>>
>> Anything else missing? Could be any feature, not just keywords.
>>
>
> Keywords:
>
> * __parameters
> * macro
>
>
'macro' is a reserved word, not a keyword.  I'd accept anything that is
valid code. :-)



> Strings:
>
> * Delimited string
> * Token string
>

This is tricky.  And I'd expect it would need a smarter lexing technology
to pull it off.


> * Seems to be missing most escape sequences
>

Not particularly bothered about having a special highlight for espace
sequences, but nice suggestion all the same.


>
> Other:
>
> __FILE__ and all related special constants
>
>
OK.  Added them all under literals.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20151115/88fdd80b/attachment.html>


More information about the Digitalmars-d mailing list