1. private with Ada.Strings.Unbounded; 
  2.  
  3. private package Expressions.Variables is 
  4.  
  5.     -- A Variable is a value of any type (boolean, number, or string) that will 
  6.     -- be resolved by name only when the expression is evaluated. 
  7.     type Variable is new Expression with private; 
  8.     type A_Variable is access all Variable'Class; 
  9.  
  10.     -- Creates a new Variable from a Token representing an indentifier name. 
  11.     function Create_Variable( token : not null A_Identifier_Token ) return A_Variable; 
  12.     pragma Postcondition( Create_Variable'Result /= null ); 
  13.  
  14. private 
  15.  
  16.     use Ada.Strings.Unbounded; 
  17.  
  18.     type Variable is new Expression with 
  19.         record 
  20.             name : Unbounded_String; 
  21.         end record; 
  22.  
  23.     procedure Construct( this : access Variable; loc : Token_Location; name : String ); 
  24.  
  25.     function Evaluate( this    : access Variable; 
  26.                        context : not null A_Eval_Context ) return A_Value; 
  27.  
  28. end Expressions.Variables;