We are forking D

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Jan 9 07:40:57 UTC 2024


On 09/01/2024 8:17 PM, Walter Bright wrote:
> On 1/8/2024 8:11 PM, Richard (Rikki) Andrew Cattermole wrote:
>> Essentially the lexer is splitting:
>>
>> ``i"prefix$(Identifier1 3.2)suffix"``
>>
>> Into:
>>
>> ``"prefix"``
>>
>> Identifier1
>>
>> 3.2
>>
>> ``"suffix"``
> 
> Yes, and see what happens with:
> 
> i"pr\\efix$(Identifier1 3.2)suffix"
> 
> Are you going to get pr\efix or prefix?

Is equivalent to:

"pr\\efix"

Identifier1

3.2

"suffix"



So you would get ``pr\efix`` as the string value. As the standard rules 
of double quoted strings would apply in that subset of the i-string.

Both: ``"p\ns"`` and ``i"p\ns"`` is the same thing, ignoring the extra 
expansion of types/values of i-string's.


More information about the Digitalmars-d mailing list