-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
------------------------------------------------------------------------------
with Osint; use Osint;
+with Prj.Env; use Prj.Env;
with Prj.Err;
with Ada.Unchecked_Deallocation;
function Expression_Kind_Of
(Node : Project_Node_Id;
- In_Tree : Project_Node_Tree_Ref) return Variable_Kind is
+ In_Tree : Project_Node_Tree_Ref) return Variable_Kind
+ is
begin
pragma Assert
(Present (Node)
- and then
+ and then -- should use Nkind_In here ??? why not???
(In_Tree.Project_Nodes.Table (Node).Kind = N_Literal_String
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Declaration
In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind =
- N_Typed_Variable_Declaration
+ N_Typed_Variable_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration
or else
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Reference
or else
- In_Tree.Project_Nodes.Table (Node).Kind =
- N_Attribute_Reference));
-
+ In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference
+ or else
+ In_Tree.Project_Nodes.Table (Node).Kind = N_External_Value));
return In_Tree.Project_Nodes.Table (Node).Expr_Kind;
end Expression_Kind_Of;
begin
pragma Assert
(Present (Node)
- and then
+ and then -- should use Nkind_In here ??? why not???
(In_Tree.Project_Nodes.Table (Node).Kind = N_Literal_String
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Declaration
In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind =
- N_Typed_Variable_Declaration
+ N_Typed_Variable_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration
or else
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Reference
or else
- In_Tree.Project_Nodes.Table (Node).Kind =
- N_Attribute_Reference));
+ In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference
+ or else
+ In_Tree.Project_Nodes.Table (Node).Kind = N_External_Value));
In_Tree.Project_Nodes.Table (Node).Expr_Kind := To;
end Set_Expression_Kind_Of;
return Pack;
end Create_Package;
- -------------------
+ ----------------------
-- Create_Attribute --
----------------------
Optional_Index_Case_Insensitive_Associative_Array
then
-- Results in: for Name ("index" at index) use "value";
- -- This is currently only used for executables
+ -- This is currently only used for executables.
+
Set_Source_Index_Of (Node, Tree, To => Int (At_Index));
+
else
-- Results in: for Name ("index") use "value" at index;
-- ??? This limitation makes no sense, we should be able to
- -- set the source index on an expression
- pragma Assert (Kind_Of (Value, Tree) = N_Literal_String);
+ -- set the source index on an expression.
+ pragma Assert (Kind_Of (Value, Tree) = N_Literal_String);
Set_Source_Index_Of (Value, Tree, To => Int (At_Index));
end if;
end if;