Contents
How to expand macros managed by token macro plugin?
You can also ask to expand all macros managed by the Token Macro plugin but also all environment and build variables using TokenMacro.expandAll. The base TokenMacro class only defines a minimalistic contract between the user of the tokens.
How are positioning macros treated in token concatenation?
With token concatenation, the positioning macros are treated literally, ending up expanding to: Is this possible to do? DD. DD. The problem is that when you have a macro replacement, the preprocessor will only expand the macros recursively if neither the stringizing operator # nor the token-pasting operator ## are applied to it.
How is the Token Pasting ( # # ) Operator used?
This is probably the least understood and most poorly documented preprocessor operator. The token pasting ( ##) operator simply eliminates any white space around it and concatenates (joins together) the non-whitespace characters together. It can only be used in a macro definition.
Is there a syntax error in the macro definition?
A syntax error exists somewhere in the macro definition. A macro successfully executes only when it receives the correct number of parameters that are of the correct type. The macro executes but the SAS code gives bad results or no results. Incorrect logic in the macro or SAS code.
Which is the subtype of the base tokenmacro class?
The base TokenMacro class only defines a minimalistic contract between the user of the tokens. To simplify the development of custom tokens, a more convenient subtype called DataBoundTokenMacro is provided to simplify the parameter parsing.
Is there a way to detect an empty macro argument?
In particular, the case that __VA_ARGS__ is empty corresponds exactly to the outcome _ISEMPTY (0, 0, 0, 1). All other outcomes will indicate that it was non-empty. We will detect this case with the following helper macro. and we leave all the other 15 cases undefined.
How to define custom tokens in jenkinsci plugin?
Those plugins that wish to define custom tokens can do so by providing implementations of the TokenMacro class that evaluates this into an arbitrary string. Those plugins that evaluate an expression can call TokenMacro.expand to have all the occurrences of the macros expanded by the available definitions.