Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
buildsupport
Commits
d3b05461
Commit
d3b05461
authored
Mar 30, 2017
by
Maxime Perrotin
Browse files
Minor refactoring
parent
d5d1bf6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
ada/buildsupport.adb
View file @
d3b05461
...
...
@@ -11,8 +11,6 @@ with Ada.Strings.Unbounded,
GNAT
.
OS_Lib
,
Errors
,
Locations
,
-- Ocarina.Namet,
-- Ocarina.Types,
Namet
,
Types
,
System
.
Assertions
,
...
...
@@ -37,8 +35,6 @@ use Ada.Strings.Unbounded,
Ada
.
Text_IO
,
Ada
.
Characters
.
Handling
,
Locations
,
-- Ocarina.Namet,
-- Ocarina.Types,
Namet
,
Types
,
Ocarina
,
...
...
ada/buildsupport_utils.adb
View file @
d3b05461
...
...
@@ -407,29 +407,31 @@ package body Buildsupport_Utils is
function
Rec_Function
(
Prefix
:
String
:=
""
;
Func
:
Node_Id
)
return
Functions
.
Vector
is
Inner
:
Node_Id
;
Res
ult
:
Functions
.
Vector
:=
Functions
.
Empty_Vector
;
Res
:
Functions
.
Vector
:=
Functions
.
Empty_Vector
;
CI
:
constant
Node_Id
:=
Corresponding_Instance
(
Func
);
Name
:
constant
String
:=
Prefix
&
(
if
Prefix
'
Length
>
0
then
"_"
else
""
)
&
AIN_Case
(
Func
);
begin
if
Get_Category_Of_Component
(
CI
)
/=
CC_System
then
null
;
elsif
Present
(
AIN
.
Subcomponents
(
CI
))
then
Inner
:=
AIN
.
First_Node
(
AIN
.
Subcomponents
(
CI
));
while
Present
(
Inner
)
loop
Result
:=
Result
&
Rec_Function
(
Prefix
=>
Name
,
Func
=>
Inner
);
Inner
:=
AIN
.
Next_Node
(
Inner
);
end
loop
;
end
if
;
if
Get_Category_Of_Component
(
CI
)
=
CC_System
and
then
(
No
(
AIN
.
Subcomponents
(
CI
))
or
Result
=
Functions
.
Empty_Vector
)
then
Result
:=
Result
&
Parse_Function
(
Name
=>
Name
,
Inst
=>
CI
);
end
if
;
return
Result
;
case
Get_Category_Of_Component
(
CI
)
is
when
CC_System
=>
if
Present
(
AIN
.
Subcomponents
(
CI
))
then
Inner
:=
AIN
.
First_Node
(
AIN
.
Subcomponents
(
CI
));
while
Present
(
Inner
)
loop
Res
:=
Res
&
Rec_Function
(
Prefix
=>
Name
,
Func
=>
Inner
);
Inner
:=
AIN
.
Next_Node
(
Inner
);
end
loop
;
end
if
;
if
No
(
AIN
.
Subcomponents
(
CI
))
or
Res
=
Functions
.
Empty_Vector
then
Res
:=
Res
&
Parse_Function
(
Name
=>
Name
,
Inst
=>
CI
);
end
if
;
when
others
=>
null
;
end
case
;
return
Res
;
end
Rec_Function
;
begin
Exit_On_Error
(
No
(
System
),
"Missing or erroneous interface view"
);
...
...
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