- All Superinterfaces:
Formation
A Concatenation represents the concatenation of a sequence of tokens.
There are two contexts in which concatenations occur. The first is with he preprocessor '##' operator. When used in the replacement sequence (body) of a macro definition, this is a binary operator that concatenates the tokens to its left and right to form a new token.
The second is with adjacent string literals, which are concatenated to form one large string literal in translation phase 7 (after preprocessing), as specified in the C11 Standard.
-
Method Summary
Modifier and TypeMethodDescriptiongetConstituent(int index) Returns the index-th string literal token in the concatenation.intGets the number of string literal tokens which are begin concatenated.Methods inherited from interface dev.civl.abc.token.IF.Formation
getLastFile, suffix
-
Method Details
-
getNumConstituents
int getNumConstituents()Gets the number of string literal tokens which are begin concatenated.- Returns:
- the number of string literals
-
getConstituent
Returns the index-th string literal token in the concatenation.- Parameters:
index- an integer in the range [0, numConstitutents-1]- Returns:
-