public class Macro extends java.lang.Object
Token.M_ARG and Token.M_STRING.| Constructor and Description |
|---|
Macro(Source source,
java.lang.String name) |
Macro(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPaste(Token tok)
Adds a "paste" operator to the expansion of this macro.
|
void |
addToken(Token tok)
Adds a token to the expansion of this macro.
|
int |
getArgs()
Returns the number of arguments to this macro.
|
java.lang.String |
getName()
Returns the name of this macro.
|
Source |
getSource()
Returns the Source from which this macro was parsed.
|
java.lang.String |
getText() |
boolean |
isFunctionLike()
Returns true if this is a function-like macro.
|
boolean |
isVariadic()
Returns true if this is a variadic function-like macro.
|
void |
setArgs(java.util.List<java.lang.String> args)
Sets the arguments to this macro.
|
void |
setSource(Source s)
Sets the Source from which this macro was parsed.
|
void |
setVariadic(boolean b)
Sets the variadic flag on this Macro.
|
java.lang.String |
toString() |
public Macro(java.lang.String name)
public Source getSource()
public java.lang.String getName()
public void setArgs(java.util.List<java.lang.String> args)
public boolean isFunctionLike()
public int getArgs()
public void setVariadic(boolean b)
public boolean isVariadic()
public void addPaste(Token tok)
public java.lang.String getText()
public java.lang.String toString()
toString in class java.lang.Object