[Issue 23999] literal suffixes dont mix well with template instantiations

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 20 20:15:03 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23999

Dennis <dkorpel at live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dkorpel at live.nl
         Resolution|---                         |INVALID

--- Comment #2 from Dennis <dkorpel at live.nl> ---
There is no ambiguity.

> The source text is split into tokens using the maximal munch algorithm, i.e., the lexical analyzer assumes the longest possible token.

https://dlang.org/spec/lex.html#source_text

The longest possible tokens in your example are `q{foo}` and `q{foo}c`
respectively, leaving `bb` and `c` as identifier tokens.

--


More information about the Digitalmars-d-bugs mailing list