How do I extract tokens from a string_literal?

I need to extract one or more tokens from a string literal.

How do I do this?

You can instantiate a lexer over any piece of text, and lex in “raw” mode.
For an example, see: llvm-project/RedundantVoidArgCheck.cpp at main · llvm/llvm-project · GitHub

1 Like


How do I expand the tokens after lexing the string literal in raw mode?