We are forking D

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Jan 9 04:11:37 UTC 2024


On 09/01/2024 5:07 PM, Walter Bright wrote:
> On 1/8/2024 7:57 PM, Richard (Rikki) Andrew Cattermole wrote:
>> So what behavior are you attributing to this escape, that requires it 
>> to not be consistent with double quoted strings?
> 
> At least in DIP1027, the istring is lexed the same as regular strings. 
> The \ is removed.

In 1036e they are handled with the same functions that handle string 
literal escapes. There is no distinction.

Once you are in the expression, the interpolated string handling becomes 
a parser calling ``scan`` to get tokens where it is doing brace counting.

Essentially the lexer is splitting:

``i"prefix$(Identifier1 3.2)suffix"``

Into:

``"prefix"``

Identifier1

3.2

``"suffix"``


More information about the Digitalmars-d mailing list