On Thursday, 12 September 2019 at 09:54:35 UTC, Ron Tarrant wrote:
I found this presented as a solution in a 2016 post:

On Wednesday, 15 June 2016 at 22:05:37 UTC, captaindet wrote:

enum myCSS = q{
    GtkNotebook {
        background-color: #e9e9e9;
    }
    GtkNotebook tab {
        background-color: #d6d6d6;
    }
};

But when I try to use it, I get the following errors:

Warning: C preprocessor directive #e9e9e9 is not supported
Warning: C preprocessor directive #d6d6d6 is not supported

I thought it was odd having 'q' in front of the opening curly brace... is this a typo? Shorthand for "string quote"? Something like that?

Or do I need to escape these somehow?

q{} is a string that must only contain valid D tokens. D lexer does not like C directives. https://dlang.org/spec/lex.html#token_strings

Reply via email to