public class AstGrep extends AstBuiltin<AstGrep>
Constructor and Description |
---|
AstGrep() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
args()
List of argument names.
|
protected Val |
exec(Val[] args)
Most Ast* functions will want to override this method.
|
int |
nargs()
Number of function's arguments + 1.
|
java.lang.String |
str()
String representation of this Ast object in the Rapids language.
|
apply
description, example, exec
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonString, write, writeExternal, writeJSON
public java.lang.String[] args()
AstPrimitive
args
in class AstPrimitive<AstGrep>
public int nargs()
AstPrimitive
nargs
in class AstPrimitive<AstGrep>
public java.lang.String str()
AstRoot
AstPrimitive
s this is the name of the function; for
AstParameter
s this is either the name of the variable, or the
value of the numeric constant that the parameter represents. For more
complicated constructs such as AstExec
or AstFunction
this method should return those objects as a Rapids string.protected Val exec(Val[] args)
AstBuiltin
exec
in class AstBuiltin<AstGrep>