Function

To store information about a function

Constructors

this
this(string functionName, DataType functionReturnType, DataType[] functionArgTypes)

constructor

this
this(string functionString)

constructor (reads from string generated by Function.toString)

Postblit

this(this)
this(this)

postblit

Members

Functions

fromString
string fromString(string str)

Reads this Function from a string (reverse of toString)

toString
string toString()

Properties

argTypes
DataType[] argTypes [@property getter]

the data type of the arguments received by this function

argTypes
DataType[] argTypes [@property setter]

the data type of the arguments received by this function

Variables

name
string name;

the name of the function

returnType
DataType returnType;

the data type of the value returned by this function

Examples

st{
	Function func = Function("potato",DataType(DataType.Type.Void),[]);
	assert(Function(func.toString) == func, func.toString);
	func = Function("potato",DataType(DataType.Type.Int),[DataType("@potatoType[]")]);
	assert(Function(func.toString) == func, func.toString

Meta