Skip to content

Commit

Permalink
Better package generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Shanti Bouchez-Mongardé committed Jun 4, 2012
1 parent 196f4be commit 62d2f8f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/xreq-step_definitions-ada05.adb
Expand Up @@ -385,9 +385,7 @@ package body XReq.Step_Definitions.Ada05 is
" procedure " & Proc_Name & " (Args : in out Arg_Type) is" & LF &
" Not_Yet_Implemented : exception;" & LF &
" begin" & LF &
" raise Not_Yet_Implemented" & LF &
" with ""Procedure "" & " & Ada_String (Proc_Name) &
" & "" not implemented"";" & LF &
" raise Not_Yet_Implemented;" & LF &
" end " & Proc_Name & ";" & LF;
end Procedure_Body;

Expand Down Expand Up @@ -416,14 +414,19 @@ package body XReq.Step_Definitions.Ada05 is
Put_Line (File, Procedure_Body (To_String (Element (I))));
Next (I);
end loop;
Put_Line (File, "-- @xreq insert above");
New_Line (File);
Put_Line (File, "end " & Package_Name & ";");
Close (File);
else
Logger.Put_Line ("Update: " & File_Name);
Open (File, In_File, File_Name);
while not End_Of_File (File) loop
Line := Get_Whole_Line (File);
if Index (Line, "end") = 1 then
if Index (Line, "@xreq insert above") > 0
or else Index (Line, "end") = 1
or else Index (Line, "begin") = 1
then
I := First (Procedures);
while Has_Element (I) loop
Append (Buffer,
Expand Down

0 comments on commit 62d2f8f

Please sign in to comment.