public final class MacroInvocation extends AbstractInvocation<MacroInvocation> implements ToplevelGoloElement
usesNamedArguments
Modifier and Type | Method and Description |
---|---|
void |
accept(GoloIrVisitor visitor)
Accept the visitor.
|
static MacroInvocation |
call(java.lang.Object name)
Calls a macro by name.
|
static MacroInvocation |
create(java.lang.Object name,
java.lang.Object... arguments)
Full macro invocation creation in one call.
|
protected MacroInvocation |
self() |
java.lang.String |
toString() |
children, getArguments, getArity, getFunctionName, getModuleName, getName, getPackageAndClass, namedArgumentsComplete, replaceElement, setPackageAndClass, usesNamedArguments, withArgs, withNamedArguments
call, clearDeclarations, declarations, hasLocalDeclarations, of, with
ancestor, ancestor, ancestorOfType, cantConvert, cantReplace, cantReplace, children, children, descendants, descendants, descendants, documentation, documentation, doesNotContain, enclosingModule, getLocalReferenceTable, hasParent, hasPosition, inheritedMetadata, makeParentOf, metadata, metadata, next, next, next, ofAST, parent, positionInSourceCode, positionInSourceCode, previous, previous, previous, replaceInParentBy, walk
public static MacroInvocation call(java.lang.Object name)
This is the same as a function call but tagged as being a macro.
name
- the name of the macro to callpublic static MacroInvocation create(java.lang.Object name, java.lang.Object... arguments)
Less readable than the fluent API, but useful when doing meta-generation.
name
- the name of the macro to callarguments
- the call argumentsprotected MacroInvocation self()
self
in class GoloElement<MacroInvocation>
public java.lang.String toString()
toString
in class java.lang.Object
public void accept(GoloIrVisitor visitor)
This method should only call the visitor visitXXXX
method.
The children of this node will be visited by the
GoloElement.walk(GoloIrVisitor)
method.
accept
in class GoloElement<MacroInvocation>