Index

Package: Functions

Description

package Scripting.Expressions.Functions is
Copyright (c) 2012 Kevin Wellwood All rights reserved. This source code is distributed under the Modified BSD License. For terms and conditions, see license.txt.

Classes

Function_Call

type Function_Call is new Expression with private;

Ancestors:

Primitive operations:

Construct
Delete (overriding Objects.Delete)
Objects.Construct (Inherited)
Objects.To_String (Inherited)
Scripting.Expressions.Construct (Inherited)
A Function is a call into the host application to perform an operation, given a set of arguments. Any type of value may be returned by the function when it is evaluated (ie: executed).

Types

A_Function

type A_Function is access all Function_Call'Class;

Subprograms & Entries

Create_Function

function Create_Function
( name: not null A_Identifier_Token ) return A_Function;
Creates a new Function from a Token, representing the function name.

Evaluate

function Evaluate
( this: access Function_Call;
context: not null A_Eval_Context ) return Value_Ptr;
todo: make this private. this is public as a workaround for a 6.2.0w OSX compiler bug

Get_Name

function Get_Name
( this: not null access Function_Call'Class ) return String;
Returns the function's name. This should match with the definition of an identifier in the scripting language.

Set_Arguments

procedure Set_Arguments
( this: not null access Function_Call'Class;
arguments: in out Expression_Lists.List );
Sets the arguments to the function as a list of Expressions. 'arguments' will be consumed.