class TokenConcatenation
Declaration
class TokenConcatenation { /* full declaration omitted */ };
Description
TokenConcatenation class, which answers the question of "Is it safe to emit two tokens without a whitespace between them, or would that cause implicit concatenation of the tokens?" For example, it emitting two identifiers "foo" and "bar" next to each other would cause the lexer to produce one "foobar" token. Emitting "1" and ")" next to each other is safe.
Declared at: clang/include/clang/Lex/TokenConcatenation.h:30
Member Variables
- private const clang::Preprocessor& PP
- private char[396] TokenInfo
- TokenInfo - This array contains information for each token on what action to take when avoiding concatenation of tokens in the AvoidConcat method.
Method Overview
- public bool AvoidConcat(const clang::Token & PrevPrevTok, const clang::Token & PrevTok, const clang::Token & Tok) const
- private bool IsIdentifierStringPrefix(const clang::Token & Tok) const
- public TokenConcatenation(const clang::Preprocessor & PP)
Methods
¶bool AvoidConcat(const clang::Token& PrevPrevTok,
const clang::Token& PrevTok,
const clang::Token& Tok) const
bool AvoidConcat(const clang::Token& PrevPrevTok,
const clang::Token& PrevTok,
const clang::Token& Tok) const
Declared at: clang/include/clang/Lex/TokenConcatenation.h:60
Parameters
- const clang::Token& PrevPrevTok
- const clang::Token& PrevTok
- const clang::Token& Tok
¶bool IsIdentifierStringPrefix(
const clang::Token& Tok) const
bool IsIdentifierStringPrefix(
const clang::Token& Tok) const
Description
IsIdentifierStringPrefix - Return true if the spelling of the token is literally 'L', 'u', 'U', or 'u8'.
Declared at: clang/include/clang/Lex/TokenConcatenation.h:67
Parameters
- const clang::Token& Tok
¶TokenConcatenation(const clang::Preprocessor& PP)
TokenConcatenation(const clang::Preprocessor& PP)
Declared at: clang/include/clang/Lex/TokenConcatenation.h:58
Parameters
- const clang::Preprocessor& PP