Package edu.udel.cis.vsl.abc.token.IF
Interface MacroExpansion
- All Superinterfaces:
Formation
A MacroExpansion represents an instance of the expansion of a preprocessor
(object or function) macro, which replaces one token by a sequence of new
tokens. This object represents the result of a macro expansion as it relates
to two tokens: the original (or "start") token before substitution, and the
resulting replacement token.
-
Method Summary
Modifier and TypeMethodDescriptiongetMacro()Returns the (function or object) macro that is being applied.intReturns the index of the replacement token in the sequence of replacement tokens specified in the macro definition.Gets the original token which was replaced.Methods inherited from interface edu.udel.cis.vsl.abc.token.IF.Formation
getLastFile, suffix
-
Method Details
-
getStartToken
CivlcToken getStartToken()Gets the original token which was replaced. For an object macro, there is only one such possible token in each instance of macro expansion; it is the token which is an identifier with the name of the macro. For a function macro, it is one of the tokens in one of the arguments to the macro or the function macro identifier itself.- Returns:
- the original token which is replaced
-
getMacro
Macro getMacro()Returns the (function or object) macro that is being applied.- Returns:
- the macro being applied
-
getReplacementTokenIndex
int getReplacementTokenIndex()Returns the index of the replacement token in the sequence of replacement tokens specified in the macro definition.- Returns:
- the replacement token index
-