I have a macro like this:
It is supposed to replace a repetitive set of implementations, I hope you understand what I am trying to do. My code here gets errors, it seems to think I'm literally using symboliccap etc. instead of something using the macro parameter.
Here is some desired output to input that will hopefully help if you don't understand.
should be equivalent to
Help greatly appreciated. 
Code:
#define IntMethods(lower, cap, parameter) \
- (MMExpressionType)symboliccapWithInt:(SInt64)parameter\
{\
return [(MMExpressionType)self symboliccap:[[MMTerm alloc] initWithInteger:parameter]];\
}\
\
- (MMExpressionType)lowerWithInt:(SInt64)parameter\
{\
return [(MMExpressionType)self lower:[[MMTerm alloc] initWithInteger:parameter]];\
}
It is supposed to replace a repetitive set of implementations, I hope you understand what I am trying to do. My code here gets errors, it seems to think I'm literally using symboliccap etc. instead of something using the macro parameter.
Here is some desired output to input that will hopefully help if you don't understand.
Code:
IntMethods(add, Add, addend)
Code:
- (MMExpressionType)symbolicAddWithInt:(SInt64)exponent
{
return [(MMExpressionType)self symbolicAdd:[[MMTerm alloc] initWithInteger:addend]];
}
- (MMExpressionType)addWithInt:(SInt64)exponent
{
return [(MMExpressionType)self add:[[MMTerm alloc] initWithInteger:addend]];
}