Index

Package: Expressions

Description

package Scripting.Expressions 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.

Packages

Expression_Lists (new Doubly_Linked_Lists)

package Expression_Lists is new Ada.Containers.Doubly_Linked_Lists( A_Expression, "=" );

Classes

Expression (abstract)

type Expression is abstract new Limited_Object with private;
An Expression represents a mathematical or logical expression tree that can be evaluated to produce a value. It is composed of operators and operands. The three base data types used in expressions are numeric, string, and boolean, which are represented with the Values hierarchy.

Types

A_Expression

type A_Expression is access all Expression'Class;

Subprograms & Entries

Evaluate (abstract)

function Evaluate
( this: access Expression;
context: not null A_Eval_Context ) return Value_Ptr is abstract;
Evaluates the expression and it's subtree(s). Returns null if the expression can't be evaluated due to mismatched types or unresolved symbols.

Delete

procedure Delete
( this: in out A_Expression );
Deletes the Expression.

Delete_Contents

procedure Delete_Contents
( expressions: in out Expression_Lists.List );
Deep deletes the list.