- All Superinterfaces:
Formation
Represents use of the '#' operator in a function-like macro application. The
hash must be followed immediately by a parameter in a function-like macro
replacement list. When the macro is expanded, the token sequence of the
corresponding actual argument is stringified into a single string token which
replaces the hash and parameter.
-
Method Summary
Modifier and TypeMethodDescriptiongetArgumentToken(int index) Returns the index-th non-whitespace token in the actual argument.getMacro()Returns the function macro that is being applied and whose replacement sequence contains the hash ('#') character.intReturns the number of non-whitespace tokens occurring in the actual argument.intReturns the index of the replacement token (which is an occurrence of a formal parameter) in the sequence of replacement tokens specified in the macro definition.Methods inherited from interface dev.civl.abc.token.IF.Formation
getLastFile, suffix
-
Method Details
-
getMacro
FunctionMacro getMacro()Returns the function macro that is being applied and whose replacement sequence contains the hash ('#') character.- Returns:
- the macro being applied
-
getReplacementTokenIndex
int getReplacementTokenIndex()Returns the index of the replacement token (which is an occurrence of a formal parameter) in the sequence of replacement tokens specified in the macro definition.- Returns:
- the replacement token index
-
getNumArgumentTokens
int getNumArgumentTokens()Returns the number of non-whitespace tokens occurring in the actual argument. These tokens will be concatenated using a single space as the separation character to form the new token. Note this number may be 0, in which case this token will be the empty string "".- Returns:
- number of non-whitespace tokens in argument
-
getArgumentToken
Returns the index-th non-whitespace token in the actual argument.- Parameters:
index- integer in range [0,n-1), where n is the number of non-whitespace tokens in the actual argument- Returns:
- the index-th non-whitespace token in argument
-