Commit 0b83a71f authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Generate C skeletons (including body)

parent 2652acd5
......@@ -28,8 +28,6 @@ package body TASTE.Backend.Skeletons is
RIs : Tag;
Func_Hdr : Translate_Set := Func_Tmpl.Header;
begin
Put ("*** Generating ");
Put_Line (Parse (Path & "header-filename.tmplt", Hdr_Tmpl));
for PI of Func_Tmpl.Provided loop
declare
Header : Translate_Set := PI.Header;
......@@ -77,9 +75,12 @@ package body TASTE.Backend.Skeletons is
end;
end loop;
Func_Hdr := Func_Hdr & Assoc ("Required_Interfaces", RIs);
Put ("*** Generating ");
Put_Line (Parse (Path & "header-filename.tmplt", Hdr_Tmpl));
Put_Line (Parse (Path & "header.tmplt", Func_Hdr));
Put ("*** Generating ");
Put_Line (Parse (Path & "body-filename.tmplt", Hdr_Tmpl));
Put_Line (Parse (Path & "body.tmplt", Func_Hdr));
exception
when E : others =>
Put_Line ("no skeletons for language " & Language & " !");
......
/* Body file for function @_Name_@
* Generated by TASTE on @_Now_@
* Generated by TASTE on @_NOW_@
* You can edit this file, it will not be overwritten
*/
......@@ -19,13 +19,13 @@ void @_LOWER:Name_@_startup()
@@TABLE@@
void @_LOWER:Name_@_PI_@_Provided_Interfaces_@
{
/* Write your code here */
// Write your code here
}
@@END_TABLE@@
@@TABLE@@
void @_LOWER:Name_@_PI_@_Timers_@
{
/* This function is called when the timer expires */
// This function is called when the timer expires
}
@@END_TABLE@@
Supports Markdown
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