[cfe-dev] More thoughts on user defined literals

Eli Friedman eli.friedman at gmail.com
Wed Jul 8 16:59:30 PDT 2009


On Wed, Jul 8, 2009 at 4:51 PM, AlisdairM(public)<public at alisdairm.net> wrote:
> My inexperienced question is - when we move from lex to parse, is it easy to identify there is no whitespace between the literal component and the ud-suffix, or should I be trying to take care of this in the lexing phase?

You can check in the parser with hasLeadingSpace(), but it's probably
better to handle it in the lexer; it would massively complicate the
parser to check for a string in every single place that expects an
identifier.

-Eli



More information about the cfe-dev mailing list