Commit 5d251da4 authored by Bechir Zalila's avatar Bechir Zalila
Browse files

* (Ocarina.Builder.AADL.Annexes.Set_Annex_Content): Transformed into a

	procedure as its name suggests.
parent 67a82805
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2015 ESA & ISAE. -- -- Copyright (C) 2009 Telecom ParisTech, 2010-2016 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -111,9 +111,9 @@ package body Ocarina.Builder.AADL.Annexes is ...@@ -111,9 +111,9 @@ package body Ocarina.Builder.AADL.Annexes is
-- Set_Annex_Content -- -- Set_Annex_Content --
----------------------- -----------------------
function Set_Annex_Content procedure Set_Annex_Content
(Annex : Ocarina.Types.Node_Id; (Annex : Ocarina.Types.Node_Id;
Text : Ocarina.Types.Name_Id) return Boolean Text : Ocarina.Types.Name_Id)
is is
use Ocarina.Types; use Ocarina.Types;
use Ocarina.ME_AADL.AADL_Tree.Nodes; use Ocarina.ME_AADL.AADL_Tree.Nodes;
...@@ -129,7 +129,6 @@ package body Ocarina.Builder.AADL.Annexes is ...@@ -129,7 +129,6 @@ package body Ocarina.Builder.AADL.Annexes is
begin begin
Set_Raw_Text (Content, Text); Set_Raw_Text (Content, Text);
Set_Annex_Content (Annex, Content); Set_Annex_Content (Annex, Content);
return True;
end Set_Annex_Content; end Set_Annex_Content;
----------------------------- -----------------------------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2015 ESA & ISAE. -- -- Copyright (C) 2009 Telecom ParisTech, 2010-2016 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -37,13 +37,13 @@ with Locations; ...@@ -37,13 +37,13 @@ with Locations;
package Ocarina.Builder.AADL.Annexes is package Ocarina.Builder.AADL.Annexes is
function Set_Annex_Content procedure Set_Annex_Content
(Annex : Ocarina.Types.Node_Id; (Annex : Ocarina.Types.Node_Id;
Text : Ocarina.Types.Name_Id) return Boolean; Text : Ocarina.Types.Name_Id);
-- Set the text of the annex. Annex is the Node_Id of the annex -- Set the text of the annex. Annex is the Node_Id of the annex
-- library or subclause, returned by Add_New_Annex_Subclause or -- library or subclause, returned by Add_New_Annex_Subclause or
-- Add_New_Annex_Library. Text is the Name_Id referencing the text -- Add_New_Annex_Library. Text is the Name_Id referencing the text
-- of the annex. Return True is everything went right, else False. -- of the annex.
function Add_New_Annex_Subclause function Add_New_Annex_Subclause
(Loc : Locations.Location; (Loc : Locations.Location;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. -- -- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2016 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -74,7 +74,7 @@ package body Ocarina.FE_AADL.Parser.Annexes is ...@@ -74,7 +74,7 @@ package body Ocarina.FE_AADL.Parser.Annexes is
In_Modes : Node_Id := No_Node; In_Modes : Node_Id := No_Node;
Loc : Location; Loc : Location;
Loc_Start_Annex : Location; Loc_Start_Annex : Location;
Annex_Content : Name_Id; Annex_Content : Name_Id := No_Name;
Annex_Location : constant Location := Token_Location; Annex_Location : constant Location := Token_Location;
begin begin
...@@ -163,9 +163,8 @@ package body Ocarina.FE_AADL.Parser.Annexes is ...@@ -163,9 +163,8 @@ package body Ocarina.FE_AADL.Parser.Annexes is
In_Modes); In_Modes);
end if; end if;
if Annex /= No_Node if Present (Annex) then
and then Set_Annex_Content (Annex, Annex_Content) Set_Annex_Content (Annex, Annex_Content);
then
Set_Corresponding_Annex (Annex, Annex_Root); Set_Corresponding_Annex (Annex, Annex_Root);
return Annex; return Annex;
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment