Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
c2dd11ef
Commit
c2dd11ef
authored
Jan 26, 2018
by
Maxime Perrotin
Browse files
Improve Ada skeleton templates
parent
f0618efc
Changes
2
Hide whitespace changes
Inline
Side-by-side
templates/skeletons/ada/body.tmplt
View file @
c2dd11ef
...
...
@@ -24,28 +24,27 @@
package
body
@
_CAPITALIZE
:
Name_
@
is
procedure
Startup
is
begin
--
Write
startup
code
here
end
Startup
;
@@
TABLE
@@
procedure
@
_
CAPITALIZE
:
Name_
@
_
@
_
Provided_Interfaces_
@
is
procedure
@
_
REPLACE_ALL
((\
n
)/):
Provided_Interfaces_
@
is
begin
null
;
--
Write
your
code
here
end
@
_CAPITALIZE
:
Name_
@
_
@
_Provided_Interfaces_
@;
null
;
end
@
_REPLACE_ALL
((\
n
)/):
REPLACE
(^(\
S
+)\
s
+.*/\
1
):
Provided_Interfaces_
@;
@@
END_TABLE
@@
@@
TABLE
@@
procedure
@
_CAPITALIZE
:
Name_
@
_
@
_
Timers_
@
is
procedure
@
_CAPITALIZE
:
Timers_
@
is
begin
--
This
function
is
called
when
the
timer
expires
,
add
your
code
null
;
--
This
function
is
called
when
the
timer
expires
end
@
_CAPITALIZE
:
Name_
@
_
@
_Timers_
@;
end
@
_CAPITALIZE
:
Timers_
@;
}
@@
END_TABLE
@@
begin
--
Write
your
startup
code
here
null
;
end
@
_CAPITALIZE
:
Name_
@;
templates/skeletons/ada/header.tmplt
View file @
c2dd11ef
...
...
@@ -26,14 +26,14 @@ use @_CAPITALIZE:ASN1_Modules_@;
package
@
_CAPITALIZE
:
Name_
@
is
--
PROVIDED
INTERFACES
-----------------------------------------------
--
--
PROVIDED
INTERFACES
-----------------------------------------------
--
--
@@
TABLE
@@
procedure
@
_REPLACE_ALL
((\
n
)/):
Provided_Interfaces_
@
with
Export
,
Convention
=>
C
,
Link_Name
=>
"@_LOWER:Name_@_PI_@_REPLACE_ALL((
\n
)/):LOWER:REPLACE(^(\S+)\s+.*/
\1)
:Provided_Interfaces_@"
;
@@
END_TABLE
@@
--
REQUIRED
INTERFACES
-----------------------------------------------
--
--
REQUIRED
INTERFACES
-----------------------------------------------
--
--
@@
TABLE
@@
procedure
@
_REPLACE_ALL
((\
n
)/):
Required_Interfaces_
@
with
Import
,
Convention
=>
C
,
Link_Name
=>
"@_LOWER:Name_@_RI_@_REPLACE_ALL((
\n
)/):LOWER:REPLACE(^(\S+)\s+.*/
\1)
:Required_Interfaces_@"
;
...
...
@@ -42,10 +42,10 @@ package @_CAPITALIZE:Name_@ is
@@
END_TABLE
@@
@@
TABLE
@@
--
FUNCTIONS
TO
HANDLE
TIMER
@
_Timers_
@
-------------------------------
--
procedure
@
_CAPITALIZE
:
Name_
@@
_
Timers_
@();
procedure
@
_CAPITALIZE
:
Name_
@
_Set_
@
_
Timers_
@(
Value
:
access
asn1SccT_UInt32
);
procedure
@
_CAPITALIZE
:
Name_
@
_Reset_
@
_
Timers_
@;
--
FUNCTIONS
TO
HANDLE
TIMER
@
_Timers_
@
-------------------------------
-
--
procedure
@
_CAPITALIZE
:
Timers_
@();
procedure
Set_
@
_CAPITALIZE
:
Timers_
@
(
Value
:
access
asn1SccT_UInt32
);
procedure
Reset_
@
_CAPITALIZE
:
Timers_
@;
@@
END_TABLE
@@
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment